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)?
Type: Posts; User: Norm
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)?
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...
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...