Author chris.stawarz
Recipients chris.stawarz, gvanrossum, janssen
Date 2007-10-10.14:49:59
SpamBayes Score 0.0165878
Marked as misclassified No
Message-id <BC8FA785-4A52-4465-8669-465820032118@csail.mit.edu>
In-reply-to <1192019236.92.0.583332636267.issue1251@psf.upfronthosting.co.za>
Content
Yeah, the pattern for doing non-blocking I/O with select() is  
different for SSL-wrapped sockets:  You always have to try the  
potentially-blocking operation first, and then call select() and  
retry in response to SSL_ERROR_WANT_READ/WRITE.  (You can also check  
SSL_pending(), but I don't think you really have to.)  Also, unlike  
normal sockets, SSL-wrapped sockets *must* be set non-blocking.

I can see how this pattern might not play nicely with asyncore.  But  
I think this is a separate (though related) issue from the one I  
reported.  As it's currently implemented, the ssl module provides no  
way of wrapping a socket without (potentially) blocking during the  
handshake, making it unusable by Twisted or any other package that  
requires all I/O to be non-blocking.  Moving the handshaking into a  
separate method solves this problem.
History
Date User Action Args
2007-10-10 14:50:00chris.stawarzsetspambayes_score: 0.0165878 -> 0.0165878
recipients: + chris.stawarz, gvanrossum, janssen
2007-10-10 14:50:00chris.stawarzlinkissue1251 messages
2007-10-10 14:50:00chris.stawarzcreate