Windows Dev Center

UdpAnySourceMulticastClient Constructor

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)

public UdpAnySourceMulticastClient(
	IPAddress groupAddress,
	int localPort
)

Parameters

groupAddress
Type: System.Net.IPAddress
The multicast group address for this receiver to subscribe to.
localPort
Type: System.Int32
The local port for this receiver to bind to.

ExceptionCondition
ArgumentNullException

groupAddress is null.

ArgumentOutOfRangeException

localPort is less than 0

-or-

localPort is greater than 65,535.

SocketException

localPort is less than 1,024.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2015 Microsoft