Re: problem with applet ....

From: Andrew Skouloudis (afterskoulNOSPAMPLEASE_at_yahoo.com)
Date: 12/31/03

  • Next message: Karl von Laudermann: "Re: Easy Layout Question"
    Date: Wed, 31 Dec 2003 16:05:43 +0200
    
    

    On 31 Dec 2003 09:23:35 +0000, Danny Woods
    <no-mail-here@black.hole.com> wrote:

    >Andrew Skouloudis <afterskoulNOSPAMPLEASE@yahoo.com> writes:
    >
    >> I am trying to create a simple applet for two playes (MineSweeper )
    >> using a server-client scheme . The problem is that I cannot make both
    >> the server and the client to create a new game (in the final version
    >> of the pogram the client and the server play on the same board but
    >> that is not the problem now ).
    >>
    >> Using the following code i can make the client start a game but not
    >> the server :
    >>
    >> localhostSocket = new Socket("127.0.0.1", 9999);
    >
    >I'm dubious about this. Applets can only connect to the IP they were
    >served from, and can't even connect to localhost. If it were allowed,
    >two applets from unrelated servers could exchange information via
    >sockets by using the loopback address. That would be a security breach
    >waiting to happen.
    >
    >Generally, expect SEVERE restrictions on networking in applets. Peer-to-peer
    >is simply not possible without digital signatures, which means that you'd
    >have to have some server side processing to allow a game at all. Each applet
    >could connect to the serving box and receive notification of events from
    >a CGI script or custom-written server app.
    >
    >As a tip, when you catch exceptions, print it out to the console during
    >development. As Andrew Thompson says, you'll most likely find that it's a
    >security exception.
    >
    >Regards,
    >
    >Danny.

    Well i don't know if it is my lucky day but i managed finally to make
    them communicate using the loopback 127.0.0.1 , Now the server can
    send the board to the client . But i have a question here . I want
    first the server to play and then to send the move to the client .
    Once the client has received the data and have the board repainted,
    he can play his move but not before that .The client cannot click on
    the board unless he sees the move of his opponent in his board . How
    can I do that ?? . How can I make the click event to have no effect on
    the board before receiving the data from the server ????


  • Next message: Karl von Laudermann: "Re: Easy Layout Question"

    Relevant Pages

    • Re: create a network game, where to begin ?
      ... and each player can see his player and the other ... - a server that broadcast the message to the others players (in my ... very little amount of data sended, the game is too slow. ... client A sends message which takes 100ms (1/10 ...
      (comp.games.development.programming.misc)
    • Re: SYNCHRONIZING problem
      ... the server side of things basically consists of a "ConnectionListener" ... all the methods of play reside in the main program CardGameServer. ... now i like animation. ... Wouldn't it be better to handle animation in the client applet? ...
      (comp.lang.java.programmer)
    • Re: What doesnt lend itself to OO?
      ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
      (comp.object)
    • This is going straight to the pool room
      ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
      (comp.os.vms)
    • Re: A Virgins Tale
      ... Xocyll wrote: ... Probably the best suited to solo play, ... They really need to allow server moves easily, ... the 50hrs I spent in NF with all the new improvements was almost like a completely new game for me. ...
      (comp.sys.ibm.pc.games.rpg)