[Libwebsockets] close: cause and TCP information

Peiffer Eric eric.peiffer at al-enterprise.com
Tue Jan 14 11:21:17 CET 2020


Hi,
I'm writing a web socket server based on libwebsocket.
When a client closes the web socket we have the event

LWS_CALLBACK_WS_PEER_INITIATED_CLOSE

But when the peer stop in an abnormal way, on the server side we do not have any event that indicate the cause. Same problem for a network issue. How can I retreive the TCP status when the web socket server receive a LWS_CALLBACK_CLOSED

Regards,

Eric Peiffer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200114/b32cf192/attachment.htm>


More information about the Libwebsockets mailing list