Udostępnij za pośrednictwem


StandardSocketOptions.SoSndbuf Property

Definition

The size of the socket send buffer.

[Android.Runtime.Register("SO_SNDBUF", ApiSince=24)]
public static Java.Net.ISocketOption? SoSndbuf { get; }
[<Android.Runtime.Register("SO_SNDBUF", ApiSince=24)>]
static member SoSndbuf : Java.Net.ISocketOption

Property Value

Attributes

Remarks

The size of the socket send buffer.

The value of this socket option is an Integer that is the size of the socket send buffer in bytes. The socket send buffer is an output buffer used by the networking implementation. It may need to be increased for high-volume connections. The value of the socket option is a <em>hint</em> to the implementation to size the buffer and the actual size may differ. The socket option can be queried to retrieve the actual size.

For datagram-oriented sockets, the size of the send buffer may limit the size of the datagrams that may be sent by the socket. Whether datagrams larger than the buffer size are sent or discarded is system dependent.

The initial/default size of the socket send buffer and the range of allowable values is system dependent although a negative size is not allowed. An attempt to set the socket send buffer to larger than its maximum size causes it to be set to its maximum size.

An implementation allows this socket option to be set before the socket is bound or connected. Whether an implementation allows the socket send buffer to be changed after the socket is bound is system dependent.

Java documentation for java.net.StandardSocketOptions.SO_SNDBUF.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to