12 #ifndef ASIO_SSL_OLD_STREAM_SERVICE_HPP 13 #define ASIO_SSL_OLD_STREAM_SERVICE_HPP 15 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 17 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 21 #include <boost/noncopyable.hpp> 35 #if defined(GENERATING_DOCUMENTATION)
46 #if defined(GENERATING_DOCUMENTATION) 52 #if defined(GENERATING_DOCUMENTATION) 68 return service_impl_.
null();
72 template <
typename Stream,
typename Context_Service>
73 void create(impl_type& impl, Stream& next_layer,
76 service_impl_.
create(impl, next_layer, context);
80 template <
typename Stream>
81 void destroy(impl_type& impl, Stream& next_layer)
83 service_impl_.
destroy(impl, next_layer);
87 template <
typename Stream>
91 return service_impl_.
handshake(impl, next_layer, type, ec);
95 template <
typename Stream,
typename HandshakeHandler>
103 template <
typename Stream>
107 return service_impl_.
shutdown(impl, next_layer, ec);
111 template <
typename Stream,
typename ShutdownHandler>
113 ShutdownHandler handler)
119 template <
typename Stream,
typename ConstBufferSequence>
123 return service_impl_.
write_some(impl, next_layer, buffers, ec);
127 template <
typename Stream,
typename ConstBufferSequence,
128 typename WriteHandler>
130 const ConstBufferSequence&
buffers, WriteHandler handler)
136 template <
typename Stream,
typename MutableBufferSequence>
137 std::size_t
read_some(impl_type& impl, Stream& next_layer,
140 return service_impl_.
read_some(impl, next_layer, buffers, ec);
144 template <
typename Stream,
typename MutableBufferSequence,
145 typename ReadHandler>
147 const MutableBufferSequence&
buffers, ReadHandler handler)
153 template <
typename Stream,
typename MutableBufferSequence>
154 std::size_t
peek(impl_type& impl, Stream& next_layer,
157 return service_impl_.
peek(impl, next_layer, buffers, ec);
161 template <
typename Stream>
162 std::size_t
in_avail(impl_type& impl, Stream& next_layer,
165 return service_impl_.
in_avail(impl, next_layer, ec);
170 void shutdown_service()
175 service_impl_type& service_impl_;
184 #endif // ASIO_SSL_OLD_STREAM_SERVICE_HPP
impl_type null() const
Return a null stream implementation.
asio::error_code handshake(impl_type &impl, Stream &next_layer, stream_base::handshake_type type, asio::error_code &ec)
Class used to uniquely identify a service.
Provides core I/O functionality.
void async_shutdown(impl_type &impl, Stream &next_layer, Handler handler)
Service & use_service(io_service &ios)
void async_shutdown(impl_type &impl, Stream &next_layer, ShutdownHandler handler)
Asynchronously shut down SSL on the 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.
asio::error_code handshake(impl_type &impl, Stream &next_layer, stream_base::handshake_type type, asio::error_code &ec)
Perform SSL handshaking.
asio::error_code shutdown(impl_type &impl, Stream &next_layer, asio::error_code &ec)
Shut down SSL on the stream.
handshake_type
Different handshake types.
void async_handshake(impl_type &impl, Stream &next_layer, stream_base::handshake_type type, HandshakeHandler handler)
Start an asynchronous SSL handshake.
const MutableBufferSequence & buffers
std::size_t peek(impl_type &, Stream &, const Mutable_Buffers &, asio::error_code &ec)
void async_write_some(impl_type &impl, Stream &next_layer, const Const_Buffers &buffers, Handler handler)
service_impl_type::impl_type impl_type
The type of a stream implementation.
std::size_t write_some(impl_type &impl, Stream &next_layer, const Const_Buffers &buffers, asio::error_code &ec)
std::size_t read_some(impl_type &impl, Stream &next_layer, const MutableBufferSequence &buffers, asio::error_code &ec)
Read some data from the stream.
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.
void async_write_some(impl_type &impl, Stream &next_layer, const ConstBufferSequence &buffers, WriteHandler handler)
Start an asynchronous write.
void destroy(impl_type &impl, Stream &)
std::size_t write_some(impl_type &impl, Stream &next_layer, const ConstBufferSequence &buffers, asio::error_code &ec)
Write some data to the stream.
std::size_t read_some(impl_type &impl, Stream &next_layer, const Mutable_Buffers &buffers, asio::error_code &ec)
Class to represent an error code value.
void async_read_some(impl_type &impl, Stream &next_layer, const MutableBufferSequence &buffers, ReadHandler handler)
Start an asynchronous read.
static asio::detail::service_id< stream_service > id
void async_read_some(impl_type &impl, Stream &next_layer, const Mutable_Buffers &buffers, Handler handler)
void destroy(impl_type &impl, Stream &next_layer)
Destroy a stream implementation.
std::size_t in_avail(impl_type &, Stream &, asio::error_code &ec)
asio::error_code shutdown(impl_type &impl, Stream &next_layer, asio::error_code &ec)
service_base(asio::io_service &io_service)
Base class for all io_service services.
void create(impl_type &impl, Stream &next_layer, basic_context< Context_Service > &context)
Create a new stream implementation.
void create(impl_type &impl, Stream &, basic_context< Context_Service > &context)
stream_service(asio::io_service &io_service)
Construct a new stream service for the specified io_service.
void async_handshake(impl_type &impl, Stream &next_layer, stream_base::handshake_type type, Handler handler)
Default service implementation for an SSL stream.