UdpSingleSourceMulticastClient.EndReceiveFromSource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
完成從加入的多播群組接收封包的非同步操作,並提供所接收的資訊。
public:
int EndReceiveFromSource(IAsyncResult ^ result, [Runtime::InteropServices::Out] int % sourcePort);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public int EndReceiveFromSource(IAsyncResult result, out int sourcePort);
[<System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)>]
member this.EndReceiveFromSource : IAsyncResult * int -> int
Public Function EndReceiveFromSource (result As IAsyncResult, ByRef sourcePort As Integer) As Integer
參數
- result
- IAsyncResult
這是非同步接收操作的結果。
- sourcePort
- Int32
封包接收來源端點。
傳回
參數中儲存 buffer 訊息的長度(以位元組計)傳遞給方法 BeginReceiveFromSource(Byte[], Int32, Int32, AsyncCallback, Object) 。
- 屬性
例外狀況
result 是空參考(Visual Basic 中無任何參考)。
多播團隊尚未加入。
嘗試存取該套接字時發生錯誤。
備註
此 EndReceiveFromSource 方法完成一個非同步操作,從多播群組中單一來源接收封包。
若執行接收操作時套接字故障,會拋出 a SocketException 。 接收到的錯誤會被指定為列舉的成員 SocketError 。