[Libwebsockets] Re-connection logic for libwebsockets

Hemant Kumar hkumar at arubanetworks.com
Tue Dec 8 04:18:47 CET 2015

I have a working libwebsocket client server and I am trying to implement reconnection logic between the two entities.
Basically, when connectivity to server is down for some reason, client keeps on trying libwebsocket_connect with same
parameters as used for the initial successful connection establishment.

I do see , client making repeated tries but every time connection attempt fails , although server is UP on another end.
For every failed try, I see libwebsocket_conext_destrory being also called, wondering if I am missing anything to clean
the old context for the re-establishment of connection.

Please advise.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20151208/6375fa5a/attachment.html>

More information about the Libwebsockets mailing list