[Libwebsockets] libwebsocket_rx_flow_control operation

"Andy Green (林安廸)" andy at warmcat.com
Tue Apr 16 13:46:31 CEST 2013

On 16/04/13 19:41, the mail apparently from Graham Newton included:
> During processing of LWS_CALLBACK_RECEIVE if I detect that my internal
> buffers are full I issue a
> libwebsocket_rx_flow_control( wsi , 1 )   call.
>  From the documentation I understand that this prevents further RX
> processing however I continue to receive more
> Am I understanding the functionality of this correctly?

No it's the other way around.

Have a look at ./test-server/test-server.c

                 lwsl_debug("LWS_CALLBACK_RECEIVE: throttling %p\n", wsi);
                 libwebsocket_rx_flow_control(wsi, 0);

0 = disable RX
1 = enable RX

Also make sure you're using git HEAD version, older versions (although I 
fixed it a while back now) did not unconditionally defeat any more RX 
activity, it used to drain its buffer first.


More information about the Libwebsockets mailing list