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

Access to wsi->ssl at LWS_CALLBACK_ESTABLISHED

This commit is contained in:
Alexander Bruines 2015-12-08 23:31:37 +01:00 committed by Andy Green
parent e97378960f
commit 8266450ba2
2 changed files with 11 additions and 2 deletions

View file

@ -781,7 +781,10 @@ struct lws_extension;
* LWS_CALLBACK_ESTABLISHED reason.
*
* LWS_CALLBACK_ESTABLISHED: after the server completes a handshake with
* an incoming client
* an incoming client. If you built the library
* with ssl support, @in is a pointer to the
* ssl struct associated with the connection or
* NULL.
*
* LWS_CALLBACK_CLIENT_CONNECTION_ERROR: the request client connection has
* been unable to complete a handshake with the remote server. If

View file

@ -264,7 +264,13 @@ handshake_0405(struct lws_context *context, struct lws *wsi)
if (wsi->protocol->callback)
wsi->protocol->callback(wsi->protocol->owning_server,
wsi, LWS_CALLBACK_ESTABLISHED,
wsi->user_space, NULL, 0);
wsi->user_space,
#ifdef LWS_OPENSSL_SUPPORT
wsi->ssl,
#else
NULL,
#endif
0);
return 0;