[Libwebsockets] Is a callback guaranteed after calling libwebsocket_callback_on_writable_all_protocol ?

Simon Schmid simon at at-point.ch
Mon Mar 13 16:33:49 CET 2017


I wanted to ask whether it is guaranteed that every connected client on my
websocket server will get a callback in the next `lws_service` call when I
issue a `libwebsocket_callback_on_writable_all_protocol`

In my case I have a ringbuffer which gets filled in a non-blocking manner,
i.e oldest data is overwritten when full and I keep the current tail
position for every client in their session data. This makes it necessary to
adjust the tail pointer of some clients in case of an overflow.

Another option would be to enumerate all connected clients and adjust the
tail pointers as I insert into the ring buffer. But I haven't found a way
to enumerate all connected clients, is there one?

The whole application is single threaded, and LWS gets to service the
socket every 50ms.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20170313/eb400382/attachment.html>

More information about the Libwebsockets mailing list