.NET Framework - Receiving Socket Close event in .NET Sockets

Asked By phil7 on 21-Apr-08 12:02 PM
How do you recognize a Socket Close event in .NET.  From what I have read on
the internet, it is done by checking if the byte count is zero in the
EndReceive() callback function in an Asynchronous type of connection.  What I
can't seem to find out is how you do this if you are using a Synchronous
connection.  Does anyone know how this is done?

Thanks,

Phil




Tom Shelton replied on 21-Apr-08 12:07 PM
A synchronous receive returns 0 if the socket has been closed.

--
Tom Shelton