UdpAnySourceMulticastClient Constructor

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

Syntax

Public Sub New ( _
    groupAddress As IPAddress, _
    localPort As Integer _
)
public UdpAnySourceMulticastClient(
    IPAddress groupAddress,
    int localPort
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

groupAddress is nullNothingnullptra null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

localPort is less than 0

-or-

localPort is greater than 65,535.

SocketException

localPort is less than 1,024.

Remarks

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.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

UdpAnySourceMulticastClient Class

System.Net.Sockets Namespace