Rediger

Del via


UdpAnySourceMulticastClient(IPAddress, Int32) Constructor

Definition

Caution

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

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

public:
 UdpAnySourceMulticastClient(System::Net::IPAddress ^ groupAddress, int localPort);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public UdpAnySourceMulticastClient (System.Net.IPAddress groupAddress, int localPort);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
new System.Net.Sockets.UdpAnySourceMulticastClient : System.Net.IPAddress * int -> System.Net.Sockets.UdpAnySourceMulticastClient
Public Sub New (groupAddress As IPAddress, localPort As Integer)

Parameters

groupAddress
IPAddress

The multicast group address for this receiver to subscribe to.

localPort
Int32

The local port for this receiver to bind to.

Attributes

Exceptions

groupAddress is null. reference

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

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.

Applies to