[Libwebsockets] How to "disconnect"?

Carlos Sánchez carlos at guadalfeo.com
Tue Jul 29 17:44:54 CEST 2014


I've make a client application that is working fine (since now) but 
testing communication issues I've reached a point where I can't solve a 
connection problem.
Once connected and after many data exchange without problems, I've 
disconnected the device from the internet without loosing the link (I've 
removed the "output" cable of the switch where device is connected). So, 
there is no link down detection and libwebsocket doesn't detect the 
disconnection from the server. After two minutes, my "ping" timer fires 
and sends a LWS_WRITE_PING without any error and of course after another 
one minute the "pong" timer fires and detect the missing server connection.
I need to "disconnect" and "connect" again ("reconnect"), but I can't 
found the analogous function of libwebsocket_client_connect().
How can I force a "disconnect" without destroying the context, and if 
possible reuse the connection?

-- 


=== IMPORTANTE: =======================================================
Este mensaje de correo electrónico y sus documentos adjuntos, están
dirigidos exclusivamente a los destinatarios especificados. La
información contenida puede ser confidencial y/o estar legalmente
protegida y no necesariamente refleja la opinión de "SISTEMAS GUADALFEO,
S.L.". Si usted recibe este mensaje por error, por favor comuníqueselo
inmediatamente al remitente y elimínelo ya que usted no está autorizado
al uso, revelación, distribución, impresión o copia de toda o alguna
parte de la información contenida. Gracias.




More information about the Libwebsockets mailing list