Provides stream-oriented functionality using SSL.
template< typename Stream> class stream : public ssl::stream_base, noncopyable
Name |
Description |
---|---|
Structure for use with deprecated impl_type. |
|
The type of the executor associated with the object. |
|
Different handshake types. |
|
The type of the lowest layer. |
|
The native handle type of the SSL stream. |
|
The type of the next layer. |
Name |
Description |
---|---|
Start an asynchronous SSL handshake. |
|
Start an asynchronous read. |
|
Asynchronously shut down SSL on the stream. |
|
Start an asynchronous write. |
|
Get the executor associated with the object. |
|
(Deprecated: Use get_executor().) Get the io_context associated with the object. |
|
(Deprecated: Use get_executor().) Get the io_context associated with the object. |
|
Perform SSL handshaking. |
|
Get a reference to the lowest layer. |
|
Get the underlying implementation in the native type. |
|
Get a reference to the next layer. |
|
Read some data from the stream. |
|
Set the callback used to verify peer certificates. |
|
Set the peer verification depth. |
|
Set the peer verification mode. |
|
Shut down SSL on the stream. |
|
Construct a stream. |
|
Write some data to the stream. |
|
Destructor. |
The stream class template provides asynchronous and blocking stream-oriented functionality using SSL.
Distinct objects: Safe.
Shared objects: Unsafe. The application must also ensure that all asynchronous operations are performed within the same implicit or explicit strand.
To use the SSL stream template with an ip::tcp::socket
, you
would write:
asio::io_context io_context; asio::ssl::context ctx(asio::ssl::context::sslv23); asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
Header: asio/ssl/stream.hpp
Convenience header: asio/ssl.hpp