1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

force client ssl bio nonblocking

Signed-off-by: Andy Green <andy.green@linaro.org>
This commit is contained in:
Andy Green 2013-01-28 17:48:21 +08:00
parent 1167dd4a6e
commit c4d05a5fa2

View file

@ -116,8 +116,11 @@ int lws_client_socket_service(struct libwebsocket_context *context, struct libwe
wsi->ssl = SSL_new(context->ssl_client_ctx);
wsi->client_bio = BIO_new_socket(wsi->sock,
BIO_NOCLOSE);
SSL_set_bio(wsi->ssl, wsi->client_bio, wsi->client_bio);
BIO_set_nbio(wsi->client_bio, 1); /* nonblocking */
SSL_set_ex_data(wsi->ssl,
openssl_websocket_private_data_index,
context);