[Libwebsockets] lws_write speed

Denis Osvald denis.osvald at sartura.hr
Wed May 18 13:08:01 CEST 2016


Hi all,

On 05/16/2016 09:33 PM, Pierre Laplante wrote:
> In the example of the server, you are using malloc to copy the data
> before using lws_write as in:
> 
> ...
> Is there another way to do this ?

Andy, have you looked at the writev syscall, if it's usable in this
scenario?

It accepts multiple buffers, so it could maybe use the first buffer for
the padding thus not requiring user to have padding space in their
buffer. It would send them both at once in one writev call then.

Maybe it's worth exploring?

Regards,

Denis



More information about the Libwebsockets mailing list