Am I misusing socket.setdefaulttimeout here?
syver-en at online.no
Fri Mar 21 00:26:57 CET 2003
Skip Montanaro <skip at pobox.com> writes:
> Syver> I was under the definite impression that timeoutsocket also
> Syver> worked by putting the socket in blocking mode.
> You meant non-blocking mode, yes?
> Need I continue? ;-)
No, (ducks) :-)
> Timeoutsocket implements a file-like abstraction (TimeoutFile)
> directly on
> top of the socket without calling the socket's makefile method.
Okay, so that's why it works. I guess I go hung up on the non blocking
part of it, which I thought was the same for the new socket and
> implements write, read, readline, readlines and flush methods. I
> this would work for the socket module as well, though there are
> some subtle semantic differences between how TimeoutFile the file-like
> objects returned by sock.makefile operate.
More information about the Python-list