[Libwebsockets] What is the max frame size that can be sent with libwebsocket_write?
"Andy Green (林安廸)"
andy at warmcat.com
Sat Jan 11 06:01:41 CET 2014
On 07/01/14 17:09, the mail apparently from satya gowtham kudupudi included:
> Come on Andy you have to answer this; google nor your in-line
> libwebsocktes.h documentation hints out. Any way I got to use fraggle
> and I want to max the buffer size. Do you suggest me any optimal buffer
> length instead of maxing out?
Your title says "max frame size", there's no real limit on that, it has
a hugle max length you'll never reach for websocket frame purposes.
But in the text you're asking about "buffer size", assuming you mean
buffer you will give to the kernel to send, it should be set by
rx_buffer_size in the protocol you're using.
0 means 4096 IIRC but you can set it larger.
Ultimately though, it's up to your kernel what size it will accept to
buffer kernelside in one go.
We get the kernel to reserve rx_buffer_size on the kernel side when we
negotiate the connection, so it should always accept that much.
Current lws also has support for dealing with partially-sent buffers, so
if you can deal with unpredicatble and possibly intense malloc() /
free() in your server, you should be able to send any size buffer on
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
More information about the Libwebsockets