[Libwebsockets] Closing connection from server side

Mauro Cigala mairo.87.me at gmail.com
Thu Dec 17 15:47:07 CET 2015


Hello,
I'm using the v. 1.5 of the lib and I need to close the websocket
connection from server side as soon as it's established.
I try to do it returning -1 in the LWS_CALLABACK_ESTABLISHED, but the
callback LWS_CALLBACK_CLOSED in the client side is not trigged.
What is the right way to do that?
Do I need to call lws_callback_on_writable() and here return -1?
What is the right way to do that?

Thanks,
Mauro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20151217/82c85231/attachment.html>


More information about the Libwebsockets mailing list