cyprus106
Programmer
- Apr 30, 2001
- 654
Im using a TServerSocket on one machine and multiple ClientSockets on other machines. When a Client Socket disconnects, I need to know which one disconnected.
I can't do something like send a message when the Client Socket disconnects on the client machine, because if there are errors that disconnect the client, or the program is shut down improperly, it will not send an error.
What I'm ending up doing is sending a message to all connections trying to find which one fell out and then adjust accordingly. But this isn't doing it, at least not the way i made it. Its slow, tedious and prone to many errors. Is there a way to find the user that disconnected? Or a function? Does anyone have code on how to do this? I'm dead stuck on this one.
Thanks alot, Cyprus
I can't do something like send a message when the Client Socket disconnects on the client machine, because if there are errors that disconnect the client, or the program is shut down improperly, it will not send an error.
What I'm ending up doing is sending a message to all connections trying to find which one fell out and then adjust accordingly. But this isn't doing it, at least not the way i made it. Its slow, tedious and prone to many errors. Is there a way to find the user that disconnected? Or a function? Does anyone have code on how to do this? I'm dead stuck on this one.
Thanks alot, Cyprus