Am I misusing socket.setdefaulttimeout here?

Syver Enstad syver-en at online.no
Thu Mar 20 18:26:57 EST 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?

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
timeout socket.

>It
> implements write, read, readline, readlines and flush methods.  I
> suspect
> 
> this would work for the socket module as well, though there are
> probably
> 
> some subtle semantic differences between how TimeoutFile the file-like
> 
> objects returned by sock.makefile operate.
> 
> Skip
> 
> 

-- 

Vennlig hilsen 

Syver Enstad







More information about the Python-list mailing list