I'm using the libwebsockets v2.4.
The doc seems unclear to me about what I have to do with the returned value of the lws_write()
function.
If it returns -1, it's an error and I'm invited to close the connection. That's fine for me.
But when it returns a value that is strictly inferior to the buffer length I pass, should I consider that I have to write the last bytes that could not be written later (in another WRITABLE callback occurrence). Is it even possible to have this situation?
Also, should I use the lws_send_pipe_choked()
before using the lws_write()
, considering that I always use lws_write()
in the context of a WRITABLE callback?