UdpAnySourceMulticastClient.UnblockSource(IPAddress) 方法

定义

注意

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

取消阻止以前通过调用 BlockSource(IPAddress) 方法阻止的源,以便接收来自该源的多播数据包。Unblocks a source that was previously blocked by a call to the BlockSource(IPAddress) method so that multicast packets originating from it can be received.

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

要取消阻止的源的地址。The address of the source to unblock.

属性

例外

尚未联接多播组。The multicast group has not yet been joined.

尝试访问套接字时出错。An error occurred when attempting to access the socket.

注解

UnblockSource方法取消阻止源自指定源地址的多播数据包,以便可以接收这些数据包。The UnblockSource method unblocks multicast packets originating from a specified source address so they can be received. 指定的源地址之前必须已被调用 BlockSource 方法阻止。The specified source address must have previously been blocked by a call to the BlockSource method.

客户端必须已完成到多播组的联接。The client must have completed a join to the multicast group.

参数可以是 sourceAddress IPv6 或 IPv4 多播地址。The sourceAddress parameter may be either an IPv6 or IPv4 multicast address.

如果在参数中指定的源地址 sourceAddress 以前未被调用 BlockSource 方法阻止, SocketException 则会引发 AddressNotAvailableIf the specified source address in the sourceAddress parameter was not previously blocked by a call to the BlockSource method, a SocketException is thrown with AddressNotAvailable.

如果执行取消阻止源操作时出现套接字错误, SocketException 则会引发。If there is a socket failure while performing the unblock source operation, a SocketException is thrown. 收到的错误被指定为枚举的成员 SocketErrorThe error received is specified as a member of the SocketError enumeration.

适用于