語言

UdpAnySourceMulticastClient(IPAddress, Int32) 建構函式

定義

警告

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

建立一個新的 UdpAnySourceMulticastClient UDP 用戶端,可以訂閱群組位址並從任何來源接收資料報。

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)

參數

groupAddress
IPAddress

此接收器要訂閱的多播群組位址。

localPort
Int32

這個接收器要綁定的本地埠。

屬性

例外狀況

groupAddress 是 null。 參考

localPort 小於 0 -或 localPort 大於 65,535。

備註

建構子會 UdpAnySourceMulticastClient 將 UDP 多播套接字與群組位址及埠關聯,但不會綁定或以其他方式使用該套接字。

參數 groupAddress 可以是 IPv6 或 IPv4 多播位址。

參數 localPort 不得指定小於 1,024 的埠。

適用於