UdpAnySourceMulticastClient(IPAddress, Int32) 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
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 的端口。