Stéphane Ninin wrote:
> I have a few questions regarding sockets with timeouts.
> 
> Assuming you set a timeout t on a socket s and then call:
> 
> 
> 1) s.sendall
> Is the socket.timeout exception thrown when
> not the data was sent in the given time t 
> or if nothing was sent ?

Neither; not exactly anyway. It may call send() several
times, and it raises socket.timeout if any of the calls
blocks for longer than the socket's timeout.


> 2) Similar question for s.send:
> Is the socket.timeout exception thrown when 
> nothing was sent or ... ?

Raised when and only when nothing was sent.


-- 
--Bryan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to