[Libwebsockets] clarification on struc lws_protocols

Andy Green andy at warmcat.com
Thu Jun 4 15:08:16 CEST 2020

On 6/4/20 1:47 PM, Alessandro Longobardi wrote:
> Hi,
> i’m using libwebsockets 3.2.2 under Raspbian stretch.
> Using command ss -tm 
> (https://www.man7.org/linux/man-pages//man8/ss.8.html 
> <https://www.man7.org/linux/man-pages/man8/ss.8.html>) I can see the 
> memory settings of my websockets:

> I have the following question: why if I change the value of 
> rx_buffer_size of struc lws_protocols, and then is use command ss -tm in 
>   memory stat the <snd_buf> is affected by rx_buffer_size? I’m expecting 
> that tx_buffer_size affects <snd_buf> …am I wrong?

IIUI this is a backwards compatibility thing... originally you could 
only set rx_buffer_size and it was also used to set the tx size.

Later (many years ago now) the struct protocols was added to allow 
setting the tx size separately...



More information about the Libwebsockets mailing list