[Libwebsockets] Problem sending more than 3263 bytes on ws

pierre30 at gmail.com pierre30 at gmail.com
Mon Jul 2 19:33:06 CEST 2018


Thank you very much it works very well.

Pierre.


Le 30-06-18 à 04:22, Andy Green a écrit :
>
>
> On 06/29/2018 08:24 PM, Andy Green wrote:
>>
>>
>> On 06/28/2018 08:53 PM, pierre30 at gmail.com wrote:
>
>>> The problem seems to be the same with my server and your example 
>>> server...
>>> If I reduce the size of the message REPEAT_STRING_LEN = 500, no 
>>> problem.
>>> Here also if I disable the permessage-deflate extension I get the 
>>> 133700 bytes in the textarea and the console. The problem seems to 
>>> be linked to permessage-deflate. Maybe Edge is not using 
>>> permessage-deflate?
>>>
>>> Is it possible that permessage-deflate sends a wrong packet size 
>>> bigger than the actual size?
>>>
>>> I tried version libwebsockets 3.0.0 v2.0.0-985-gc708bda0.
>>>
>>> Could you reproduce it or does it works well on your computer?
>>
>> Looks like something up somewhere... I'll look at it closer tomorrow 
>> (~+12h).
>
> It's a problem introduced during the big "role" refactor before v3.0 
> was released.  This fixes it here:
>
> diff --git a/lib/roles/ws/ops-ws.c b/lib/roles/ws/ops-ws.c
> index d6e690ee..8a25f531 100644
> --- a/lib/roles/ws/ops-ws.c
> +++ b/lib/roles/ws/ops-ws.c
> @@ -1280,7 +1280,7 @@ int rops_handle_POLLOUT_ws(struct lws *wsi)
>          *             payload ordering, but since they are always 
> complete
>          *             fragments control packets can interleave OK.
>          */
> -       if (lwsi_role_client(wsi) && wsi->ws->tx_draining_ext) {
> +       if (wsi->ws->tx_draining_ext) {
>                 lwsl_ext("SERVICING TX EXT DRAINING\n");
>                 if (lws_write(wsi, NULL, 0, LWS_WRITE_CONTINUATION) < 0)
>                         return LWS_HP_RET_BAIL_DIE;
>
>
> I pushed that and some other related cleanup like reduce the loglevel 
> of the NOTICE stuff to EXTENSION on v3.0-stable and master.
>
> Autobahn remains happy.  So please give it a try.
>
> -Andy



More information about the Libwebsockets mailing list