From 22f7150b56977bab05092634ea2782bdf3f43d54 Mon Sep 17 00:00:00 2001 From: Alexandre Erwin Ittner Date: Thu, 6 Feb 2014 23:15:51 -0200 Subject: [PATCH] Fix documentation for LWS_CALLBACK_FILTER_NETWORK_CONNECTION At the time callback LWS_CALLBACK_FILTER_NETWORK_CONNECTION is called, there is no client connection information yet, so the parameter wsi still pointing to the main server connection. Add an description of this behavior to the documentation. --- lib/libwebsockets.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libwebsockets.h b/lib/libwebsockets.h index 2fd78b18e..554d450f9 100644 --- a/lib/libwebsockets.h +++ b/lib/libwebsockets.h @@ -547,11 +547,12 @@ struct libwebsocket_extension; * the server at network level; the connection is accepted but then * passed to this callback to decide whether to hang up immediately * or not, based on the client IP. @in contains the connection - * socket's descriptor. Return non-zero to terminate - * the connection before sending or receiving anything. - * Because this happens immediately after the network connection - * from the client, there's no websocket protocol selected yet so - * this callback is issued only to protocol 0. + * socket's descriptor. Since the client connection information is + * not available yet, @wsi still pointing to the main server socket. + * Return non-zero to terminate the connection before sending or + * receiving anything. Because this happens immediately after the + * network connection from the client, there's no websocket protocol + * selected yet so this callback is issued only to protocol 0. * * LWS_CALLBACK_FILTER_HTTP_CONNECTION: called when the request has * been received and parsed from the client, but the response is