ReceiveCompletedEventArgs.AsyncResult 屬性

定義

取得或設定要求的非同步作業結果。

public:
 property IAsyncResult ^ AsyncResult { IAsyncResult ^ get(); void set(IAsyncResult ^ value); };
public IAsyncResult AsyncResult { get; set; }
member this.AsyncResult : IAsyncResult with get, set
Public Property AsyncResult As IAsyncResult

屬性值

IAsyncResult,包含與接收作業相關聯的資料。

備註

AsyncResult 識別進行中或已完成的異步操作。 屬性包含的數據可協助判斷要完成的數個潛在異步操作之哪一項,以及傳遞至事件處理程式時,可存取 EndReceive 與已完成作業相關聯的訊息。

當您呼叫 BeginReceive時, IAsyncResult 即使訊息存在,仍會立即傳回 ,因為作業尚未完成,所以尚未擷取訊息。 AsyncResult表示異步操作的狀態。 BeginReceive 會建立 物件,它會在整個作業中修改,直到 EndReceive 完成為止。

適用於

另請參閱