|
-
October 18th, 2006, 10:16 PM
#1
problems with recv on n/w cable unplugging
Hi,
In one of my programs i connect a client to my server and when i disconnect the client system from the network the recv method in the server code still keeps waiting , and when i reconnect it the parent spawns another process to handle the new client connection ( i mean its coded that way ), what i need to know is when i disconnect the client from the n/w will recv ( or read or select for that matter ) never know what happened to the client ?? or is there a better way to handle this situation ??
Last edited by ecostar; October 18th, 2006 at 10:17 PM.
Reason: abc
-
October 19th, 2006, 02:49 PM
#2
Re: problems with recv on n/w cable unplugging
An unplugged cable is not a network error, so, unless something else happens, recv() will sit there, potentially forever.
You could implement a "keep alive" protocol if this is important to you.
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|