[Logo]
Forums Register Login
one client and two servers
Hi all,

now I have created my applications but I think it does not work correctly.

I have two servers and one client , the client must get data from the servers simultaneously.

It get the data from them, but it sometimes does not work correctly, and it writes the data from one of the servers.
here is my code.

[ July 10, 2006: Message edited by: Medes Agri ]
After sending their results, your servers are immediately exiting. This can result in the data being discarded by the operating system before the client has a chance to read it. The servers can either loop to service another client (which is of course what servers normally do) or they can just do a "System.in.read()", to wait for you to press Enter before they exit. Either way, that should fix the client.
The happiness of your life depends upon the quality of your thoughts -Marcus Aurelius ... think about this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss


This thread has been viewed 777 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 18, 2018 20:03:51.