Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > dotnet framework > april 2008 >

dotnet framework : Receiving Socket Close event in .NET Sockets


Phil
4/21/2008 9:02:01 AM
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,

Tom Shelton
4/21/2008 9:07:29 AM
[quoted text, click to view]

A synchronous receive returns 0 if the socket has been closed.

--
AddThis Social Bookmark Button