I am writing a .NET C # application that sends and receives data through Sockets, and I am having some problems if the client application crashes without closing the socket in the correct way.
I set the "receive time" to the given value, and I expected Socket.Receive () to throw an exception after this period of time. But instead, the method simply returns 0.
So my question is: is it possible that the socket is still open if Socket.Receive() returns 0? Or can I safely assume that it does not work?
(Maybe a little hard to understand. If so, let me know in the comments)
source share