Skip to content

Socket Issue

Daniel van Pletzen

Asked Mar 19, 2008, 2:09 AM EDT1 answer
Share
LinkedInX
Hey

I got a client and server socket connected asyn, and i got an issue when the network cable is unplugged on client side. the server does not know client is disconnected, and when it sends data there is no exception .. and i believe sendtimeout only works on sync sockets.. any idea's of what i can do on server to catch that client has disconnected ?

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    I believe that the only way of doing this is to have a property in your connection class that keeps count and/or time of the last send/receive action along with the System.Threading.Timer firing periodically that will perform the check against the timeout value.
    0