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. |
|
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. |
|
Move-assign a stream from another. |
|
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. |
|
stream [constructor] |
Construct a stream. |
Write some data to the stream. |
|
~stream [destructor] |
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 my_context; asio::ssl::context ctx(asio::ssl::context::sslv23); asio::ssl::stream<asio:ip::tcp::socket> sock(my_context, ctx);
Header: asio/ssl/stream.hpp
Convenience header: asio/ssl.hpp