why does socket.makefile require non-blocking mode?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Mon Mar 31 15:02:29 EDT 2008
En Mon, 31 Mar 2008 14:15:56 -0300, Forest <tibit at sonic.net> escribió:
> My main concern is this: A brief look at the existing socket._fileobject
> shows that its read() method calls recv() in a loop, appending to a
> temporary buffer on each pass, and finally returning the buffer when
> recv() gets no more data. It looks to me like a socket timeout exception
> would cause that loop to exit without saving the data collected in
> earlier
> passes. In other words, data loss on recv() timeout.
Just do it. Do the experiment; if there is data loss, you prove your point
(if not, it doesn't prove that data loss could not happen).
--
Gabriel Genellina
More information about the Python-list
mailing list