DatagramSocket.ReceiveBufferSize Property

Definition

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

public virtual int ReceiveBufferSize { [Android.Runtime.Register("getReceiveBufferSize", "()I", "GetGetReceiveBufferSizeHandler")] get; [Android.Runtime.Register("setReceiveBufferSize", "(I)V", "GetSetReceiveBufferSize_IHandler")] set; }
[<get: Android.Runtime.Register("getReceiveBufferSize", "()I", "GetGetReceiveBufferSizeHandler")>]
[<set: Android.Runtime.Register("setReceiveBufferSize", "(I)V", "GetSetReceiveBufferSize_IHandler")>]
member this.ReceiveBufferSize : int with get, set

Property Value

the value of the SO_RCVBUF option for this DatagramSocket

Attributes

Exceptions

Remarks

Property getter documentation:

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

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

Property setter documentation:

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

Because SO_RCVBUF is a hint, applications that want to verify what size the buffers were set to should call #getReceiveBufferSize().

Increasing SO_RCVBUF may allow the network implementation to buffer multiple packets when packets arrive faster than are being received using #receive(DatagramPacket).

Note: It is implementation specific if a packet larger than SO_RCVBUF can be received.

Java documentation for java.net.DatagramSocket.setReceiveBufferSize(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