[Libwebsockets] How to send messages frequently ?

hanguofu hanguofu at 163.com
Sat Jan 21 21:15:02 CET 2017


I develop an application based on example libwebsockets-test-client. The application has 2 threads : in main thread there is routine callback_dumb_increment  and the message loop : lws_service(context, 50 );


At the other thread , the application send messages with lws_callback_on_writable.
Unfortunately , the interval of message vary much and it may be as  short as 1 millisecond sometimes.


Is it a must to change the message loop interval to  lws_service(context, 1 ) ? I found out some messages are dropped  without any notice if  the "Timeout for poll" is large .


Regards !


Guofu Han
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20170122/b90866d4/attachment.html>


More information about the Libwebsockets mailing list