UdpSingleSourceMulticastClient(IPAddress, IPAddress, Int32) Konstruktor

Definicja

Przestroga

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

Tworzy nowego UdpSingleSourceMulticastClient klienta UDP, który może subskrybować adres grupy i odbierać datagramy z jednego źródła.

public:
 UdpSingleSourceMulticastClient(System::Net::IPAddress ^ sourceAddress, 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 UdpSingleSourceMulticastClient (System.Net.IPAddress sourceAddress, 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.UdpSingleSourceMulticastClient : System.Net.IPAddress * System.Net.IPAddress * int -> System.Net.Sockets.UdpSingleSourceMulticastClient
Public Sub New (sourceAddress As IPAddress, groupAddress As IPAddress, localPort As Integer)

Parametry

sourceAddress
IPAddress

Adres źródłowy nadawcy dla tego odbiorcy, który ma subskrybować.

groupAddress
IPAddress

Adres grupy multiemisji dla tego odbiorcy, który ma subskrybować.

localPort
Int32

Port lokalny dla tego odbiorcy, z którym ma zostać utworzone powiązanie.

Atrybuty

Wyjątki

sourceAddress i groupAddress musi być tą samą rodziną adresów.

sourceAddress jest odwołaniem o wartości null (Nothing w Visual Basic).

-lub- groupAddress jest odwołaniem o wartości null (Nothing w Visual Basic).

localPort jest mniejsze niż 0 -lub- localPort jest większa niż 65 535.

localPort jest mniejsza niż 1024

Uwagi

UdpSingleSourceMulticastClientKonstruktor kojarzy gniazdo MULTIEMISJI UDP z adresem i portem grupy, ale nie tworzy powiązania ani nie używa tego gniazda.

groupAddressParametr może być adresem multiemisji IPv6 lub IPv4. Jednak Rodzina adresów sourceAddress groupAddress parametrów i musi być taka sama.

localPortParametr nie może określać portu mniejszego niż 1 024.

Dotyczy