boost::corosio::tls_stream::handshake
Asynchronously perform the TLS handshake.
Synopsis
Declared in <boost/corosio/tls_stream.hpp>
[[nodiscard]]
virtual
capy::task<capy::results<>>
handshake(tls_role role) = 0;
Description
Initiates the TLS handshake process. For client connections, this sends the ClientHello and processes the server's response. For server connections, this waits for the ClientHello and sends the server's response.
A handshake attempt consumes the stream state, whether it succeeds or not. A subsequent call behaves as if reset() ran first, and performs a fresh handshake using the current configuration.
Return Value
An awaitable yielding (error_code).
|
The return value should not be discarded. |
Preconditions
-
The underlying stream must be connected. No other TLS operation may be in progress on this stream.
Created with MrDocs