UdpAnySourceMulticastClient Constructor (IPAddress, Int32)

.NET Framework (current version)

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.

Creates a new UdpAnySourceMulticastClient UDP client that can subscribe to a group address and receive datagrams from any source.

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.", 
public UdpAnySourceMulticastClient(
	IPAddress groupAddress,
	int localPort


Type: System.Net.IPAddress

The multicast group address for this receiver to subscribe to.

Type: System.Int32

The local port for this receiver to bind to.

Exception Condition

groupAddress is null. reference


localPort is less than 0 -or- localPort is greater than 65,535.

The UdpAnySourceMulticastClient constructor associates a UDP multicast socket with a group address and port, but does not bind or otherwise use the socket.

The groupAddress parameter may be either an IPv6 or IPv4 multicast address.

The localPort parameter must not specify a port less than 1,024.

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