UdpAnySourceMulticastClient.UnblockSource(IPAddress) 方法

定义

注意

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

取消阻止以前通过调用 BlockSource(IPAddress) 方法阻止的源,以便接收来自该源的多播数据包。

public:
 void UnblockSource(System::Net::IPAddress ^ sourceAddress);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public void UnblockSource (System.Net.IPAddress sourceAddress);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.UnblockSource : System.Net.IPAddress -> unit
Public Sub UnblockSource (sourceAddress As IPAddress)

参数

sourceAddress
IPAddress

要取消阻止的源的地址。

属性

例外

尚未联接多播组。

尝试访问套接字时出错。

注解

方法 UnblockSource 取消阻止源自指定源地址的多播数据包,以便可以接收它们。 指定的源地址之前必须被调用 BlockSource 方法阻止。

客户端必须已完成多播组的加入。

参数 sourceAddress 可以是 IPv6 或 IPv4 多播地址。

如果参数中的 sourceAddress 指定源地址以前没有被调用 BlockSource 方法阻止, SocketException 则会使用 AddressNotAvailable引发 。

如果在执行取消阻止源操作时出现套接字故障, SocketException 则会引发 。 收到的错误指定为枚举的成员 SocketError

适用于