[Libwebsockets] Truncated send handled by user not working as expected

Roger Light roger at atchoo.org
Mon Aug 18 15:51:18 CEST 2014


On Mon, Aug 18, 2014 at 1:23 PM, Andy Green <andy at warmcat.com> wrote:

> As soon as libwebsocket_write() figured it needed to buffer something, you are
> not allowed to send anything new on libwebsocket_write() until the buffered stuff
> is used up.
>
> Instead you must return to the service loop, where lws will service its buffer until
> it is empty, before giving you any new WRITEABLE callbacks.

Great, this is exactly what I'd expect. What does libwebsocket_write()
return to tell us that we aren't allowed to send anything new until it
has been serviced?

Cheers,

Roger



More information about the Libwebsockets mailing list