Message56318
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. |
|
| Date |
User |
Action |
Args |
| 2007-10-10 18:13:06 | chris.stawarz | set | spambayes_score: 0.56163 -> 0.56163 recipients:
+ chris.stawarz, janssen |
| 2007-10-10 18:13:06 | chris.stawarz | link | issue1251 messages |
| 2007-10-10 18:13:05 | chris.stawarz | create | |
|