[Libwebsockets] clarification on struc lws_protocols

Alessandro Longobardi alessandro.longobardi at vrmedia.it
Thu Jun 4 14:47:04 CEST 2020

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:
The output format is:


                     the memory allocated for receiving packet

                     the total memory can be allocated for receiving packet

                     the memory used for sending packet (which has been sent
                     to layer 3)

                     the total memory can be allocated for sending packet

                     the memory allocated by the socket as cache, but not
                     used for receiving/sending packet yet. If need memory
                     to send/receive packet, the memory in this cache will
                     be used before allocate additional memory.

                     The memory allocated for sending packet (which has not
                     been sent to layer 3)

                     The memory used for storing socket option, e.g., the
                     key for TCP MD5 signature

                     The memory used for the sk backlog queue. On a process
                     context, if the process is receiving packet, and a new
                     packet is received, it will be put into the sk backlog
                     queue, so it can be received by the process immediately

                     the number of packets dropped before they are de-
                     multiplexed into the socket

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?
Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200604/b5fbd41e/attachment.htm>

More information about the Libwebsockets mailing list