[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.
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 734 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 19, 2018 13:21:13.