[Libwebsockets] libwebsocket_rx_flow_control operation

Graham Newton gnewton at peavey-eu.com
Tue Apr 16 13:57:45 CEST 2013


Andy
Thanks for the swift reply.
Yes I realised I had written it the wrong way round once I sent the message.
I meant
libwebsocket_rx_flow_control(wsi, 0);
I will check the latest git version.
Thanks
Graham

On 16/04/13 12:46, "Andy Green (林安廸)" wrote:
> 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
>> LWS_CALLBACK_RECEIVE events.
>> 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.
>
> -Andy

-- 
Graham Newton
Senior Software Engineer
------------------------------------------------------------------------
Peavey Digital Research
A Division of Peavey Electronics Corporation


Phone 	+44 1865 734397
Direct 	+44 1865 734397
Email 	gnewton at peavey-eu.com
Web 	www.peaveycommercialaudio.com 
<http://www.peaveycommercialaudio.com> - mm.peavey.com 
<http://mm.peavey.com> - www.crestaudio.com <http://www.crestaudio.com> 
- aa.peavey.com <http://aa.peavey.com> - www.peaveyoxford.com 
<http://www.peaveyoxford.com>


*PEAVEY COMMERCIAL AUDIO* - Great Folds Road, Corby, Northamptonshire, 
NN18 9ET UK
*PEAVEY DIGITAL RESEARCH* - 6 Elm Place, Eynsham, Oxfordshire OX29 4BD UK
*PEAVEY ITALIA* - Via P.La Torre 21, Zona Ind.le Cerretano, 60022 
Castelfidardo An, Italy
*PEAVEY CHINA* - 1F Taiping Yaoye, 3 Gongye Wu Lu, Shekou, Shenzhen 
China 518067
*PEAVEY ELECTRONICS CORPORATION* - 5022 Hartley Peavey Drive, Meridian, 
MS 39305 USA


Peavey Electronics Limited is a registered company in England & Wales, 
Company Registration No.: 01249126
Registered office: GREAT FOLDS ROAD OAKLEY HAY CORBY NORTHAMPTONSHIRE. 
NN18 9ET

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20130416/36146961/attachment-0001.html>


More information about the Libwebsockets mailing list