DatagramSocket.SendBufferSize Property

Definition

Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket. -or- Sets the SO_SNDBUF option to the specified value for this DatagramSocket.

public virtual int SendBufferSize { [Android.Runtime.Register("getSendBufferSize", "()I", "GetGetSendBufferSizeHandler")] get; [Android.Runtime.Register("setSendBufferSize", "(I)V", "GetSetSendBufferSize_IHandler")] set; }
[<get: Android.Runtime.Register("getSendBufferSize", "()I", "GetGetSendBufferSizeHandler")>]
[<set: Android.Runtime.Register("setSendBufferSize", "(I)V", "GetSetSendBufferSize_IHandler")>]
member this.SendBufferSize : int with get, set

Property Value

the value of the SO_SNDBUF option for this DatagramSocket

Attributes

Exceptions

Remarks

Property getter documentation:

Get value of the SO_SNDBUF option for this DatagramSocket, that is the buffer size used by the platform for output on this DatagramSocket.

Java documentation for java.net.DatagramSocket.getSendBufferSize().

Property setter documentation:

Sets the SO_SNDBUF option to the specified value for this DatagramSocket. The SO_SNDBUF option is used by the network implementation as a hint to size the underlying network I/O buffers. The SO_SNDBUF setting may also be used by the network implementation to determine the maximum size of the packet that can be sent on this socket.

As SO_SNDBUF is a hint, applications that want to verify what size the buffer is should call #getSendBufferSize().

Increasing the buffer size may allow multiple outgoing packets to be queued by the network implementation when the send rate is high.

Note: If #send(DatagramPacket) is used to send a DatagramPacket that is larger than the setting of SO_SNDBUF then it is implementation specific if the packet is sent or discarded.

Java documentation for java.net.DatagramSocket.setSendBufferSize(int).

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