Socket.CancelConnectAsync(SocketAsyncEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cancels an asynchronous request for a remote host connection.
public:
static void CancelConnectAsync(System::Net::Sockets::SocketAsyncEventArgs ^ e);
public static void CancelConnectAsync (System.Net.Sockets.SocketAsyncEventArgs e);
static member CancelConnectAsync : System.Net.Sockets.SocketAsyncEventArgs -> unit
Public Shared Sub CancelConnectAsync (e As SocketAsyncEventArgs)
Parameters
The SocketAsyncEventArgs object used to request the connection to the remote host by calling one of the ConnectAsync(SocketType, ProtocolType, SocketAsyncEventArgs) methods.
Exceptions
The e
parameter cannot be null and the RemoteEndPoint cannot be null.
An error occurred when attempting to access the socket.
The Socket has been closed.
A caller higher in the call stack does not have permission for the requested operation.
Remarks
The CancelConnectAsync method cancels an asynchronous request for a remote host connection.