UdpAnySourceMulticastClient.EndReceiveFromGroup(IAsyncResult, IPEndPoint) 方法

定義

警告

此 API 現已淘汰。

完成從已聯結之多點傳送群組接收封包的非同步作業,並提供接收到的資訊。Completes the asynchronous operation of receiving a packet from the joined multicast group and provides the information received.

public:
 int EndReceiveFromGroup(IAsyncResult ^ result, [Runtime::InteropServices::Out] System::Net::IPEndPoint ^ % source);
[System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public int EndReceiveFromGroup (IAsyncResult result, out System.Net.IPEndPoint source);
member this.EndReceiveFromGroup : IAsyncResult * IPEndPoint -> int
Public Function EndReceiveFromGroup (result As IAsyncResult, ByRef source As IPEndPoint) As Integer

參數

result
IAsyncResult

非同步接收作業的結果。The result of the asynchronous receive operation.

source
IPEndPoint

接收到之封包的來源端點。The source endpoint where the packet was received from.

傳回

傳遞至 BeginReceiveFromGroup(Byte[], Int32, Int32, AsyncCallback, Object) 方法之緩衝區參數中所儲存的訊息長度 (以位元組為單位)。The length, in bytes, of the message stored in the buffer parameter passed to the BeginReceiveFromGroup(Byte[], Int32, Int32, AsyncCallback, Object) method.

屬性

例外狀況

result 是 null 參考 (在 Visual Basic 中為 Nothing)。result is a null reference (Nothing in Visual Basic).

尚未聯結多點傳送群組。The multicast group has not yet been joined.

嘗試存取通訊端時發生錯誤。An error occurred when attempting to access the socket.

備註

EndReceiveFromGroup方法會完成非同步作業,以從多播群組接收封包。The EndReceiveFromGroup method completes an asynchronous operation to receive a packet from a multicast group.

如果在執行接收作業時發生通訊端失敗, SocketException則會擲回。If there is a socket failure while performing the receive operation, a SocketException is thrown. 收到的錯誤會指定為SocketError列舉的成員。The error received is specified as a member of the SocketError enumeration.

適用於