| AnyConnect Secure Mobility Client 5.1.1.42

- Main Page
- Related Pages
- Classes
- Files

# Managing VPN Connections

## connect

This method initiates a connection to the specified host, resulting in the presentation of authentication credentials, as appropriate. The ClientIfc::UserPromptCB method delivers any credential requests sent by the secure gateway. The ClientIfc::UserSubmit method must be called to signal to the API that these requested prompts have been completed and are ready for delivery back to the Secure Gateway.

See ConnectPromptInfo for more details on possible authentication credentials.

If the connection request is accepted, true is returned. This does not mean the VPN connection will succeed. If the connection succeeds, the state VPNState::CONNECTED will be received by the ClientIfc::StateCB method.

## disconnect

This method can be used to initiate a disconnect of the currently active VPN connection.

When the VPN disconnect completes, the state VPNState::DISCONNECTED will be received by the ClientIfc::StateCB method.