By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

Socket not blocking

P: n/a
I got a problem with my server.

I use a Socket in Blocking mode.

I created an infine loop and wait for data using the Receive method.

This works really good until the client disconnects. Afther that the Receive
method wont block anymore and the Connected property still returns true.

The thread used by the connection now eats all CPU time.

So how do i find out if a connection is broken?

---
My code:

Listening server:
http://paste.phpfi.com/41712
Thread for Client->Server connection:
http://paste.phpfi.com/41713
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.