How do I reconnect a disconnected socket?
Grant Edwards
grante at visi.com
Fri Mar 28 12:47:55 EDT 2008
On 2008-03-28, Laszlo Nagy <gandalf at shopzeus.com> wrote:
>
>> Yes, that is exactly what it means.
>>
>> >From the recv() man page:
>>
>> RETURN VALUE
>> These calls return the number of bytes received, or -1 if an error
>> occurred. The return value will be 0 when the peer has performed an
>> orderly shutdown.
>>
>>
> Mea cupla. :-)
>
> What about non-blocking sockets?
$ man recv
...
If no messages are available at the socket, the receive
calls wait for a message to arrive, unless the socket is
non-blocking (see fcntl(2)), in which case the value -1
is returned and the external variable errno set to
EAGAIN.
...
--
Grant
More information about the Python-list
mailing list