当前位置: 技术问答>linux和unix
关于TCP/IP发送缓冲区和接受缓冲区的问题
来源: 互联网 发布时间:2017-01-17
本文导语: 在linux下,我使用getsockopt得到了SO_RECVBUF和SO_SNDBUF的值,请问这两个选项的单位是KB么? | BYTE | SO_SNDBUF Sets or gets the maximum socket send buffer in bytes. T...
在linux下,我使用getsockopt得到了SO_RECVBUF和SO_SNDBUF的值,请问这两个选项的单位是KB么?
|
BYTE
|
SO_SNDBUF
Sets or gets the maximum socket send buffer in bytes. The kernel doubles this value (to allow space for bookkeeping overhead) when it is
set using setsockopt(2), and this doubled value is returned by getsockopt(2). The default value is set by the
/proc/sys/net/core/wmem_default file and the maximum allowed value is set by the /proc/sys/net/core/wmem_max file. The minimum (doubled)
value for this option is 2048.
是bytes.