Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SocketAsyncEventArgs::Completed Event

 

The event used to complete an asynchronous operation.

Namespace:   System.Net.Sockets
Assembly:  System (in System.dll)

public:
event EventHandler<SocketAsyncEventArgs^>^ Completed {
	void add(EventHandler<SocketAsyncEventArgs^>^ value);
	void remove(EventHandler<SocketAsyncEventArgs^>^ value);
}

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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2017 Microsoft