Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    5
    Views
    2,377

    Re: ServerSocket send data to all Sockets

    Yes, static will do that. Each Player would be sharing the one socket. Wouldn't that show up in the testing if the last client got several copies of the same thing (one copy for each client)?
  2. Replies
    5
    Views
    2,377

    Re: ServerSocket send data to all Sockets

    Have you tried debugging the code by adding printlns to show the values of variables when they are changed and used. For example, players. When is a Player object added to it? How many Player...
  3. Replies
    5
    Views
    2,377

    Re: ServerSocket send data to all Sockets

    sounds like you need to save the connections to all the clients that have connected in a collection of some kind so you can use that connection to send something to each of them.

    It's hard to say...
Results 1 to 3 of 3