|
Multi-client echo server
Hello
I am currently learning how to program a multi-client server. I still have some code to configure, however I think I am fairly near to the end.
My main problem is that whenever I connect with one client and receive an echo, do the same with another client and receive an echo, then try and receive another echo for the first client the server seems to stall at the point where it is supposed to receive the message. The client says it has sent the message so I don't know why this is happening.
And yet when server doesn't send an echo back to the first client, the second client can operate normally. I've also noticed that only when the second client closes does the echo to the first client return, but this is obviously not what I intended.
The echo service works fine in single client mode, it is when simultaneous access is attempted that problems arise.
Could anyone tell me why this is happening?
Any help would be much appreciated.
Last edited by slanj; 05-16-2008 at 03:30 PM.
|