[Libwebsockets] How to disconnect a client connection?

Danomi Czaski djczaski at gmail.com
Wed Apr 1 15:29:12 CEST 2015

>On 1 April 2015 03:59:03 GMT+08:00, Danomi Czaski <djczaski at gmail.com> wrote:
>>What is the proper way to disconnect and clean up a client connection?
>>There is a call for `libwebsocket_client_connect` but I don't see a
>>corresponding `libwebsocket_client_disconnect`.
>>My application needs to switch between different servers based upon a
>>user command.
>Just return nonzero from most callbacks will kill that connection.
>The test client tests this actually, he keeps making connections with a
>limited lifetime that close and make a fresh connection,

But then I need to wait for a callback event, like LWS_CALLBACK_CLIENT_RECEIVE,
in order to return nonzero and terminate the connection. Can't I force the close
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20150401/d8d2f296/attachment-0001.html>

More information about the Libwebsockets mailing list