socket block ????

Eric Hagemann ehagemann at home.com
Thu Jan 4 20:42:47 EST 2001


Making use of the socket module, the library manual indicates that the
default behavior of the module is to block on a read or a write.  But when
using socket.recv(buf) some times it returns before reading len(buf) bytes.

I have tried seting the blocking flag explicitly via socket.setblocking()
with the same result

Beazley's book indicates a flag parameter of MSG_WAITALL which will cause
the routine to wait for len(buf) bytes, but that variable is not defined in
the socket module nor on the recv(2) manual page as suggested by the Python
Lib Docs.

Also I do not see any exceptions rased when this behavior occurs


Anybody seen this behavior ?

Cheers
Eric






More information about the Python-list mailing list