[Libwebsockets] Denying a Connection

Mooki Moo mookimoo73 at gmail.com
Sat Apr 14 12:01:34 CEST 2018


I am using the LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION reason to
determine if a user’s connection request can continue. As part of this
process I check to see if they are logged elsewhere and if this is the
case I deny them.

However, regardless of my setting the lws_close_reason with an
appropriate message (that I wanted to display in my Web UI) the JS
'debug" code tell me I always get a 1006 error code with no reason
text.

Can someone tell me the most elegant way I can do this please, so that
I can propagate a message back to the user, to explain why they cannot
connect.

—
Bill


More information about the Libwebsockets mailing list