...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Provides stream-oriented functionality using SSL.
template< typename Stream, typename Service = stream_service> class stream : public ssl::stream_base
Name |
Description |
---|---|
Different handshake types. |
|
The native implementation type of the stream. |
|
The type of the lowest layer. |
|
The type of the next layer. |
|
The type of the service that will be used to provide stream operations. |
Name |
Description |
---|---|
Start an asynchronous SSL handshake. |
|
Start an asynchronous read. |
|
Asynchronously shut down SSL on the stream. |
|
Start an asynchronous write. |
|
Get the io_service associated with the object. |
|
Perform SSL handshaking. |
|
Get the underlying implementation in the native type. |
|
Determine the amount of data that may be read without blocking. |
|
(Deprecated: use get_io_service().) Get the io_service associated with the object. |
|
Get a reference to the lowest layer. Get a const reference to the lowest layer. |
|
Get a reference to the next layer. |
|
Peek at the incoming data on the stream. |
|
Read some data from the stream. |
|
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.
To use the SSL stream template with an ip::tcp::socket
, you would write:
boost::asio::io_service io_service; boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23); boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sock(io_service, context);
Header: boost/asio/ssl/stream.hpp
Convenience header: boost/asio/ssl.hpp