Forest wrote:
> I guess you mean that since _fileobject.read() calls recv() multiple
> times, the second and later calls might block even if select() said the
> socket was
> readable.
The main problem is buffering. The select() may block on
the socket even though the file object has data in its
bu
Bryan Olson wrote:
>Looking at the code for the existing _fileobject's read method, it
>will loose data it has already read if a socket.recv() call raises
>an exception. The function keeps buffers in a local variable that
>will be lost if an exception exits the scope. That much could be
>fixed wit
En Mon, 31 Mar 2008 14:15:56 -0300, Forest <[EMAIL PROTECTED]> 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()
On Sat, 29 Mar 2008 08:18:23 -0300, Guilherme Polo wrote:
>I don't know why you think timeout is forbidden too, it is not.
I can't tell for sure whether it is or isn't, because of this language in
the socket module docs: "s.settimeout(0.0) is equivalent to
s.setblocking(0); s.settimeout(None) is
2008/3/28, Forest <[EMAIL PROTECTED]>:
> The socket.makefile() docs say, "the socket must be in blocking mode." I
> don't see any explanation of why blocking mode is required, and I'm not sure
> whether that means timeout mode is forbidden as well. Can someone clarify
> this?
>
Have you set y
Forest wrote:
> The socket.makefile() docs say, "the socket must be in blocking mode." I
> don't see any explanation of why blocking mode is required, and I'm not sure
> whether that means timeout mode is forbidden as well. Can someone clarify
> this?
Looking at the code for the existing _fileob
The socket.makefile() docs say, "the socket must be in blocking mode." I
don't see any explanation of why blocking mode is required, and I'm not sure
whether that means timeout mode is forbidden as well. Can someone clarify
this?
I wanted to use file-like objects with socket timeouts, so I ended