Default service implementation for an SSL stream. More...
#include <stream_service.hpp>
Public Types | |
typedef service_impl_type::impl_type | impl_type |
The type of a stream implementation. | |
Public Member Functions | |
template<typename Stream , typename HandshakeHandler > | |
void | async_handshake (impl_type &impl, Stream &next_layer, stream_base::handshake_type type, HandshakeHandler handler) |
Start an asynchronous SSL handshake. | |
template<typename Stream , typename MutableBufferSequence , typename ReadHandler > | |
void | async_read_some (impl_type &impl, Stream &next_layer, const MutableBufferSequence &buffers, ReadHandler handler) |
Start an asynchronous read. | |
template<typename Stream , typename ShutdownHandler > | |
void | async_shutdown (impl_type &impl, Stream &next_layer, ShutdownHandler handler) |
Asynchronously shut down SSL on the stream. | |
template<typename Stream , typename ConstBufferSequence , typename WriteHandler > | |
void | async_write_some (impl_type &impl, Stream &next_layer, const ConstBufferSequence &buffers, WriteHandler handler) |
Start an asynchronous write. | |
template<typename Stream , typename Context_Service > | |
void | create (impl_type &impl, Stream &next_layer, basic_context< Context_Service > &context) |
Create a new stream implementation. | |
template<typename Stream > | |
void | destroy (impl_type &impl, Stream &next_layer) |
Destroy a stream implementation. | |
template<typename Stream > | |
asio::error_code | handshake (impl_type &impl, Stream &next_layer, stream_base::handshake_type type, asio::error_code &ec) |
Perform SSL handshaking. | |
template<typename Stream > | |
std::size_t | in_avail (impl_type &impl, Stream &next_layer, asio::error_code &ec) |
Determine the amount of data that may be read without blocking. | |
impl_type | null () const |
Return a null stream implementation. | |
template<typename Stream , typename MutableBufferSequence > | |
std::size_t | peek (impl_type &impl, Stream &next_layer, const MutableBufferSequence &buffers, asio::error_code &ec) |
Peek at the incoming data on the stream. | |
template<typename Stream , typename MutableBufferSequence > | |
std::size_t | read_some (impl_type &impl, Stream &next_layer, const MutableBufferSequence &buffers, asio::error_code &ec) |
Read some data from the stream. | |
template<typename Stream > | |
asio::error_code | shutdown (impl_type &impl, Stream &next_layer, asio::error_code &ec) |
Shut down SSL on the stream. | |
void | shutdown_service () |
Destroy all user-defined handler objects owned by the service. | |
stream_service (asio::io_service &io_service) | |
Construct a new stream service for the specified io_service. | |
template<typename Stream , typename ConstBufferSequence > | |
std::size_t | write_some (impl_type &impl, Stream &next_layer, const ConstBufferSequence &buffers, asio::error_code &ec) |
Write some data to the stream. | |
Private Types | |
typedef detail::openssl_stream_service | service_impl_type |
Private Attributes | |
service_impl_type & | service_impl_ |
Default service implementation for an SSL stream.
Definition at line 37 of file stream_service.hpp.
The type of a stream implementation.
Definition at line 58 of file stream_service.hpp.
typedef detail::openssl_stream_service asio::ssl::stream_service::service_impl_type [private] |
Definition at line 46 of file stream_service.hpp.
asio::ssl::stream_service::stream_service | ( | asio::io_service & | io_service | ) | [inline, explicit] |
Construct a new stream service for the specified io_service.
Definition at line 62 of file stream_service.hpp.
void asio::ssl::stream_service::async_handshake | ( | impl_type & | impl, |
Stream & | next_layer, | ||
stream_base::handshake_type | type, | ||
HandshakeHandler | handler | ||
) | [inline] |
Start an asynchronous SSL handshake.
Definition at line 104 of file stream_service.hpp.
void asio::ssl::stream_service::async_read_some | ( | impl_type & | impl, |
Stream & | next_layer, | ||
const MutableBufferSequence & | buffers, | ||
ReadHandler | handler | ||
) | [inline] |
Start an asynchronous read.
Definition at line 154 of file stream_service.hpp.
void asio::ssl::stream_service::async_shutdown | ( | impl_type & | impl, |
Stream & | next_layer, | ||
ShutdownHandler | handler | ||
) | [inline] |
Asynchronously shut down SSL on the stream.
Definition at line 120 of file stream_service.hpp.
void asio::ssl::stream_service::async_write_some | ( | impl_type & | impl, |
Stream & | next_layer, | ||
const ConstBufferSequence & | buffers, | ||
WriteHandler | handler | ||
) | [inline] |
Start an asynchronous write.
Definition at line 137 of file stream_service.hpp.
void asio::ssl::stream_service::create | ( | impl_type & | impl, |
Stream & | next_layer, | ||
basic_context< Context_Service > & | context | ||
) | [inline] |
Create a new stream implementation.
Definition at line 81 of file stream_service.hpp.
void asio::ssl::stream_service::destroy | ( | impl_type & | impl, |
Stream & | next_layer | ||
) | [inline] |
Destroy a stream implementation.
Definition at line 89 of file stream_service.hpp.
asio::error_code asio::ssl::stream_service::handshake | ( | impl_type & | impl, |
Stream & | next_layer, | ||
stream_base::handshake_type | type, | ||
asio::error_code & | ec | ||
) | [inline] |
Perform SSL handshaking.
Definition at line 96 of file stream_service.hpp.
std::size_t asio::ssl::stream_service::in_avail | ( | impl_type & | impl, |
Stream & | next_layer, | ||
asio::error_code & | ec | ||
) | [inline] |
Determine the amount of data that may be read without blocking.
Definition at line 170 of file stream_service.hpp.
impl_type asio::ssl::stream_service::null | ( | ) | const [inline] |
Return a null stream implementation.
Definition at line 74 of file stream_service.hpp.
std::size_t asio::ssl::stream_service::peek | ( | impl_type & | impl, |
Stream & | next_layer, | ||
const MutableBufferSequence & | buffers, | ||
asio::error_code & | ec | ||
) | [inline] |
Peek at the incoming data on the stream.
Definition at line 162 of file stream_service.hpp.
std::size_t asio::ssl::stream_service::read_some | ( | impl_type & | impl, |
Stream & | next_layer, | ||
const MutableBufferSequence & | buffers, | ||
asio::error_code & | ec | ||
) | [inline] |
Read some data from the stream.
Definition at line 145 of file stream_service.hpp.
asio::error_code asio::ssl::stream_service::shutdown | ( | impl_type & | impl, |
Stream & | next_layer, | ||
asio::error_code & | ec | ||
) | [inline] |
Shut down SSL on the stream.
Definition at line 112 of file stream_service.hpp.
void asio::ssl::stream_service::shutdown_service | ( | ) | [inline, virtual] |
Destroy all user-defined handler objects owned by the service.
Implements asio::io_service::service.
Definition at line 69 of file stream_service.hpp.
std::size_t asio::ssl::stream_service::write_some | ( | impl_type & | impl, |
Stream & | next_layer, | ||
const ConstBufferSequence & | buffers, | ||
asio::error_code & | ec | ||
) | [inline] |
Write some data to the stream.
Definition at line 128 of file stream_service.hpp.
Definition at line 178 of file stream_service.hpp.