ReceiveCompletedEventArgs.AsyncResult Property

Definition

Gets or sets the result of the asynchronous operation requested.

C#
public IAsyncResult AsyncResult { get; set; }

Property Value

A IAsyncResult that contains the data associated with the receive operation.

Remarks

AsyncResult identifies ongoing or completed asynchronous operations. The property contains data that helps determine which of several potential asynchronous operations to complete, and when passed to the event handler, enables EndReceive to access the message associated with the completed operation.

When you call BeginReceive, a IAsyncResult is returned immediately, even though a message, if one exists, has not yet been retrieved because the operation is not completed. The AsyncResult indicates the state of the asynchronous operation. BeginReceive creates the object, which is modified throughout the operation until EndReceive completes it.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also