提交 4f8faf9b authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5325 i'll put the nonblocking in but I still think this is a problem with…

FS-5325 i'll put the nonblocking in but I still think this is a problem with openssl, a short read is not there every single time you connect, When the lib is in full blocking mode it should be handling the complicated actions internally.  As complicated as socket programming is, async ssl is even worse because it requires you to do your own buffering and attemps to read may fail waiting for you to write or vice-versa which should have been handled for us in the lib.  non-interruptable syscalls are getting pretty outdated and not enabling it is much less complex than making every socket app on earth be non-blocking
上级 3847ae02
......@@ -239,8 +239,8 @@ handshake (struct stream_data *data)
if( SSL_set_fd(data->ssl, (int)(intptr_t)data->sock) != 1 ) return IKS_NOMEM;
/* Set both the read and write BIO's to non-blocking mode */
//BIO_set_nbio(SSL_get_rbio(data->ssl), 1);
//BIO_set_nbio(SSL_get_wbio(data->ssl), 1);
BIO_set_nbio(SSL_get_rbio(data->ssl), 1);
BIO_set_nbio(SSL_get_wbio(data->ssl), 1);
finished = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论