語言

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

要解除封鎖的來源地址。

屬性

例外狀況

多播團隊尚未加入。

這些 UdpAnySourceMulticastClient 已經被處理掉了。

嘗試存取該套接字時發生錯誤。

備註

此 UnblockSource 方法會解除來自指定來源位址的多播封包,以便接收。 指定的來源位址必須先前已被方法呼叫 BlockSource 阻擋。

用戶端必須完成與多播群組的連接。

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

如果參數中sourceAddress指定的來源位址之前並未被方法BlockSource呼叫阻擋,則會拋出 a SocketException 並拋出。AddressNotAvailable

若執行解封來源操作時套接程式故障,會拋出 a SocketException 。 接收到的錯誤會被指定為列舉的成員 SocketError 。

適用於