Redigera

Dela via


SocketAsyncEventArgs.Completed Event

Definition

The event used to complete an asynchronous operation.

public:
 event EventHandler<System::Net::Sockets::SocketAsyncEventArgs ^> ^ Completed;
public event EventHandler<System.Net.Sockets.SocketAsyncEventArgs> Completed;
public event EventHandler<System.Net.Sockets.SocketAsyncEventArgs>? Completed;
member this.Completed : EventHandler<System.Net.Sockets.SocketAsyncEventArgs> 
Public Custom Event Completed As EventHandler(Of SocketAsyncEventArgs) 

Event Type

Remarks

The Completed event provides a way for client applications to complete an asynchronous socket operation. An event handler should be attached to the event within a SocketAsyncEventArgs instance when an asynchronous socket operation is initiated, otherwise the application will not be able to determine when the operation completes.

The completion callback delegates referenced by the Completed event contains program logic to finish processing the asynchronous socket operation for the client.

When the event is signaled, the application uses the SocketAsyncEventArgs object parameter to obtain the status of the completed asynchronous socket operation.

Applies to