Upraviť

Zdieľať cez


Socket.CancelConnectAsync(SocketAsyncEventArgs) Method

Definition

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

e
SocketAsyncEventArgs

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.

Applies to