[Libwebsockets] sporadic connection close on Rx

Roman Nikiforov rnikiforov at gmx.net
Fri Nov 5 09:41:32 CET 2021


On 11/4/21 5:46 PM, Andy Green wrote:
>
> Does this problem go away if you disable permessage-deflate at either 
> the sender or the receiver?
>
It seems lws has extensions disabled by default. I tried to add this code

         const struct lws_extension extensions[] = {                 { 
                         "permessage-deflate",                         
lws_extension_callback_pm_deflate,                         
"permessage-deflate"                          "; 
client_no_context_takeover"                          "; 
client_max_window_bits"                 },                 { NULL, NULL, 
NULL /* terminator */ }         };         contextInfo.extensions = 
extensions; and got "undefined reference to 
`lws_extension_callback_pm_deflate'".

Call to lwsl_wsi_ext(wsi, "post inflate ebuf in len %d / out len 
%d",...) is outside of

#if !defined(LWS_WITHOUT_EXTENSIONS)

and thus log message "post inflate ebuf" visible without extensions 
turned on.

> Is lws also doing the sending?
No, server side uses QWebSocketServer and according to docs extensions 
are not supported.

--

Roman

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


More information about the Libwebsockets mailing list