Chris Stawarz added the comment:

I meant that SSL-wrapped sockets must be set non-blocking in the case  
where you want to do non-blocking I/O with them using select().  This  
is another difference between SSL-wrapped sockets and normal  
sockets.  With a normal socket, as long as you use select() to know  
when a read or write won't block, it shouldn't matter whether you've  
called setblocking(False) on the socket (although there may be corner  
cases where it does).

With an SSL-wrapped socket, you have to try the I/O operation first,  
and then call select() if it fails with SSL_ERROR_WANT_READ/WRITE.   
But that won't happen if the socket is in blocking mode.  In that  
case, the OpenSSL call will just block until the operation completes  
(or an error or disconnection occurs).

That's my understanding, anyway, based on the OpenSSL man pages and  
my own usage.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1251>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to