[Libwebsockets] What is the message telling me.

Andy Green andy at warmcat.com
Fri Nov 18 18:19:31 CET 2016

On November 19, 2016 1:08:00 AM GMT+08:00, Stephen James <sajames1958 at gmail.com> wrote:
>4, 0x7fe7a0001cf0 new partial sent 1044 from 1285 total

You asked to send 1285 bytes.  But the kernel only accepted 1044 bytes.

Lws will buffer the balance of 241 bytes and send it automatically next time the connection becomes writable.  As such, this is not an error but telling about a loss of efficiency.

Lws just gets informed when a connection could be written to.  But there is no information from the OS about how much may be written until you try to do the write.

If you are seeing this every write, the cause is likely you set the lws_protocols struct for the protocol to have .rx_buffer_size of ~1024; this also sets the biggest single write attempt limit.  If you increase this to be bigger than what you're sending, the message will become much less frequent.


>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org

More information about the Libwebsockets mailing list