Socket SO SNDBUF: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:


The current value is obtained with <tt>getSendBufferSize()</tt> and set with <tt>setSendBufferSize(int)</tt>. SO_SNDBUF is used by the network implementation as a hint to size the underlying I/O buffers. Calling <tt>setSendBufferSize(int)</tt> is no guarantee that the implementation will use the value, so the application may want to verify the buffer size with <tt>getSendBufferSize()</tt>.
The current value is obtained with <tt>getSendBufferSize()</tt> and set with <tt>setSendBufferSize(int)</tt>. SO_SNDBUF is used by the network implementation as a hint to size the underlying I/O buffers. Calling <tt>setSendBufferSize(int)</tt> is no guarantee that the implementation will use the value, so the application may want to verify the buffer size with <tt>getSendBufferSize()</tt>.
Also see [[Kernel_Runtime_Configuration#net.core.wmem_default|net.core.wmem_default]] and [[Kernel_Runtime_Configuration#net.core.wmem_max|net.core.wmem_max]], the related Linux kernel configuration attributes.

Revision as of 18:17, 8 June 2017

External

Internal

Overview

The current value is obtained with getSendBufferSize() and set with setSendBufferSize(int). SO_SNDBUF is used by the network implementation as a hint to size the underlying I/O buffers. Calling setSendBufferSize(int) is no guarantee that the implementation will use the value, so the application may want to verify the buffer size with getSendBufferSize().

Also see net.core.wmem_default and net.core.wmem_max, the related Linux kernel configuration attributes.