Begins an asynchronous request to disconnect from a remote endpoint.
Namespace:
System.Net.Sockets
Assembly:
System (in System.dll)
Visual Basic (Declaration)
Public Function DisconnectAsync ( _
e As SocketAsyncEventArgs _
) As Boolean
Dim instance As Socket
Dim e As SocketAsyncEventArgs
Dim returnValue As Boolean
returnValue = instance.DisconnectAsync(e)
public bool DisconnectAsync(
SocketAsyncEventArgs e
)
public:
bool DisconnectAsync(
SocketAsyncEventArgs^ e
)
public function DisconnectAsync(
e : SocketAsyncEventArgs
) : boolean
Return Value
Type:
System..::.BooleanReturns 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.
When using a connection-oriented protocol, calling the DisconnectAsync method requests a disconnect from a remote endpoint. If you set SocketAsyncEventArgs..::.DisconnectReuseSocket to true in the e parameter, the socket can be reused.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5 SP1, 3.0 SP1, 2.0 SP1
Reference