|
|
|
|
@ -533,12 +533,14 @@ static int websocket_http(struct lws *wsi, enum lws_callback_reasons reason, voi
|
|
|
|
|
case LWS_CALLBACK_PROTOCOL_DESTROY:
|
|
|
|
|
case LWS_CALLBACK_FILTER_NETWORK_CONNECTION:
|
|
|
|
|
case LWS_CALLBACK_FILTER_HTTP_CONNECTION:
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 4
|
|
|
|
|
case LWS_CALLBACK_HTTP_CONFIRM_UPGRADE:
|
|
|
|
|
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
|
|
|
|
|
#endif
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 3
|
|
|
|
|
case LWS_CALLBACK_ADD_HEADERS:
|
|
|
|
|
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_HTTP_DROP_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_EVENT_WAIT_CANCELLED: // ?
|
|
|
|
|
case LWS_CALLBACK_HTTP_CONFIRM_UPGRADE:
|
|
|
|
|
#endif
|
|
|
|
|
break;
|
|
|
|
|
case LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION:
|
|
|
|
|
@ -595,12 +597,14 @@ static int websocket_protocol(struct lws *wsi, enum lws_callback_reasons reason,
|
|
|
|
|
case LWS_CALLBACK_PROTOCOL_INIT:
|
|
|
|
|
case LWS_CALLBACK_PROTOCOL_DESTROY:
|
|
|
|
|
case LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION:
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 4
|
|
|
|
|
case LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL:
|
|
|
|
|
#endif
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 3
|
|
|
|
|
case LWS_CALLBACK_ADD_HEADERS:
|
|
|
|
|
case LWS_CALLBACK_HTTP_BIND_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_EVENT_WAIT_CANCELLED: // ?
|
|
|
|
|
case LWS_CALLBACK_WS_SERVER_BIND_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_WS_SERVER_DROP_PROTOCOL:
|
|
|
|
|
case LWS_CALLBACK_WS_PEER_INITIATED_CLOSE:
|
|
|
|
|
#endif
|
|
|
|
|
break;
|
|
|
|
|
@ -729,7 +733,7 @@ int websocket_init(void) {
|
|
|
|
|
|
|
|
|
|
struct lws_context_creation_info wci = {
|
|
|
|
|
.options = LWS_SERVER_OPTION_EXPLICIT_VHOSTS |
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 3
|
|
|
|
|
#if LWS_LIBRARY_VERSION_MAJOR >= 4
|
|
|
|
|
LWS_SERVER_OPTION_FAIL_UPON_UNABLE_TO_BIND |
|
|
|
|
|
#endif
|
|
|
|
|
0,
|
|
|
|
|
|