UdpAnySourceMulticastClient.ReceiveBufferSize Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Note: This API is now obsolete.

Gets or sets the size, in bytes, of the receive buffer of the Socket used for multicast receive operations on this UdpAnySourceMulticastClient instance.

Namespace:   System.Net.Sockets
Assembly:  System.Net (in System.Net.dll)

[ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", 
	true)]
public int ReceiveBufferSize { get; set; }

Property Value

Type: System.Int32

Returns Int32.

The size, in bytes, of the receive buffer.

Exception Condition
ArgumentOutOfRangeException

The buffer size specified is less than 0.

InvalidOperationException

The multicast group has not yet been joined.

ObjectDisposedException

The UdpAnySourceMulticastClient has been disposed.

The ReceiveBufferSize property gets or sets the size, in bytes, of the receive buffer of the underlying Socket used for multicast receive operations on this UdpAnySourceMulticastClient instance. Specifically, the ReceiveBufferSize property controls the size of the buffer used by the stack when a packet arrives, but the application has not yet called the BeginReceiveFromGroup method. If this buffer gets filled up and packets keep coming before the application calls the BeginReceiveFromGroup and EndReceiveFromGroup methods, old packets will get dropped. The application will never be able to receive the old packets, and will instead receive newer packets when it calls the BeginReceiveFromGroup method.

The default size of the receive buffer on Windows is 8,192 bytes.

.NET Framework
Available since 4.5
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show: