Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2008

Tip: Looking for answers? Try searching our database.

Receiving Socket Close event in .NET Sockets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil - 21 Apr 2008 17:02 GMT
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 - 21 Apr 2008 17:07 GMT
> 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?

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

Signature

Tom Shelton


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.