UdpSingleSourceMulticastClient(IPAddress, IPAddress, Int32) コンストラクター

定義

注意事項

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

グループ アドレスをサブスクライブし、1 つのソースからデータグラムを受信できる新しい UdpSingleSourceMulticastClient UDP クライアントを作成します。

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)

パラメーター

sourceAddress
IPAddress

この受信者がサブスクライブする送信者の送信元アドレス。

groupAddress
IPAddress

この受信者がサブスクライブするマルチキャスト グループ アドレス。

localPort
Int32

この受信側のバインドするローカル ポート。

属性

例外

sourceAddressgroupAddress は同じアドレス ファミリである必要があります。

sourceAddress は null 参照です (Visual Basicでは Nothing)。

-又は-

groupAddress は null 参照です (Visual Basicでは Nothing)。

localPort が 0 未満です

-又は-

localPort が 65,535 を超える。

localPort が 1024 未満です

注釈

UdpSingleSourceMulticastClient コンストラクターは、UDP マルチキャスト ソケットをグループ アドレスとポートに関連付けますが、ソケットをバインドしたり使用したりしません。

groupAddress パラメーターには、IPv6 または IPv4 マルチキャスト アドレスを指定できます。 ただし、 sourceAddress パラメーターと groupAddress パラメーターのアドレス ファミリは同じである必要があります。

localPort パラメーターでは、1,024 未満のポートを指定しないでください。

適用対象