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 ??
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