Socket.DisconnectAsync Method (SocketAsyncEventArgs)
Begins an asynchronous request to disconnect from a remote endpoint.
Assembly: System (in System.dll)
Return ValueType: System.Boolean
Returns true if the I/O operation is pending. The SocketAsyncEventArgs.Completed event on the e parameter will be raised upon completion of the operation.
Returns false if the I/O operation completed synchronously. In this case, The SocketAsyncEventArgs.Completed event on the e parameter will not be raised and the e object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation.
The e parameter cannot be null.
A socket operation was already in progress using the System.Net.Sockets.SocketAsyncEventArgs object specified in the e parameter.
Windows XP or later is required for this method.
The Socket has been closed.
An error occurred when attempting to access the socket.
When using a connection-oriented protocol, calling the SocketAsyncEventArgs.DisconnectReuseSocket to true in the e parameter, the socket can be reused.method requests a disconnect from a remote endpoint. If you set
Available since 2.0