posted 11 years ago
I'm creating a simple server client / server. The client has a list of names and sends them one at a time to the server, the server then tries to locate that name within an arrayList "WhatsWhat.srvrList". If the server finds the name it then returns some additional info from the arrayList to the client.
The communication works perfectly when both client and server are on the same machine, but I'm running into problems when the two are run on separate boxes. When they are run on separate machines, the client receives a seemingly random set of replies. If the client requests info on 10 names, I only end up with replies for 2 to 4. If on the other hand, I run client and server on the same box, I get all 10 replies.
Either the client or the server seems to be dropping information over the network, or somehow lagging behind. Is it unwise to be pulling data out of an arrayList as I've done? How can I ensure that the client waits to get a response for each name it sends?
Server:
Client: