[Libwebsockets] Client App | Recreating websocket connection faster

Harshad Italiya harshaditaliya at gmail.com
Sat Jul 16 13:03:54 CEST 2016


Hello,

I am using libwebsocket and I have created client application. I am using
GSM modem in my system for internet connectivity and because of that there
are many times I am loosing GPRS and I have implemented my application in
such a way so if there is GPRS lost then I am closing the connection
by *"lws_context_destroy(lws_context)"
*this can also be in case when there is something wrong between client and
server custom protocol communication missing.

I have seen when I am closing connection when GPRS is lost and then it's
back but not able to create a connection with server. While if I restart
application then it gets connect fine.

Is wait required after *lws_context_destroy* function call and before
calling *lws_client_connect function*.

Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20160716/b004ed88/attachment.html>


More information about the Libwebsockets mailing list