[Libwebsockets] RX Flow Control
andy at warmcat.com
Tue Apr 23 16:11:18 CEST 2019
On 23/04/2019 14:58, Ralf Dreesen wrote:
> I'm using libwebsocket 3.1.0 on Windows. After adding rx flow control to
> my code (calls of lws_rx_flow_control), I encounter message-loss. I
> check the server-echo example for differences to my code, but it looks
Can you please check with current v3.1-stable branch, or master?
I fixed a very similar-sounding problem over the last few days on
v3.1-stable and master
The exact conditions related to dealing with the case we have buffered
rx, rx flow control was released and reapplied while "playing back" from
the rxflow buflist.
Normally the code is supposed to report to the called how much it
consumed... but in the case it consumed from the rxflow buffer, the
accounting for it must only be done there.
rx flow control used to be pretty simple, we just turned POLLIN wait on
or off. But with lws supporting concealing buffered rx when flow
control is on, supporting compression, and now confronted with http/2
where you can't flow control the network socket because it contains many
multiplexed streams, it's no longer simple.
More information about the Libwebsockets