template<class Handler, class
Stream, class MutableBufferSequence, class Allocator = std::allocator<void>>
class Botan::TLS::detail::AsyncReadOperation< Handler, Stream, MutableBufferSequence, Allocator >
Definition at line 111 of file asio_async_ops.h.
template<class Handler , class Executor1 , class Allocator >
template<class... Args>
Call the completion handler.
This function should only be called after an intermediate initiating function has been called.
- Parameters
-
args | Arguments forwarded to the completion handler function. |
Definition at line 100 of file asio_async_ops.h.
101 {
104 }
boost::asio::executor_work_guard< Executor1 > m_work_guard_1
References Botan::TLS::detail::AsyncBase< Handler, Executor1, Allocator >::m_handler, and Botan::TLS::detail::AsyncBase< Handler, Executor1, Allocator >::m_work_guard_1.
Referenced by Botan::TLS::detail::AsyncReadOperation< Handler, Stream, MutableBufferSequence, Allocator >::operator()(), Botan::TLS::detail::AsyncWriteOperation< Handler, Stream, Allocator >::operator()(), and Botan::TLS::detail::AsyncHandshakeOperation< Handler, Stream, Allocator >::operator()().
template<class Handler , class
Stream , class MutableBufferSequence , class Allocator = std::allocator<void>>
Definition at line 139 of file asio_async_ops.h.
140 {
141 reenter(this)
142 {
143 if(bytes_transferred > 0 && !ec)
144 {
145
146 boost::asio::const_buffer read_buffer{m_stream.
input_buffer().data(), bytes_transferred};
148 }
149
151 {
152
153 ec = boost::asio::error::eof;
154 }
155 else if (ec == boost::asio::error::eof)
156 {
157
159 }
160
161 if(!m_stream.
has_received_data() && !ec && boost::asio::buffer_size(m_buffers) > 0)
162 {
163
165 return;
166 }
167
169 {
170
172 }
173
174 if(!isContinuation)
175 {
176
177
178 m_ec = ec;
179 yield m_stream.
next_layer().async_read_some(boost::asio::mutable_buffer(), std::move(*
this));
180 ec = m_ec;
181 }
182
184 }
185 }
std::size_t copy_received_data(MutableBufferSequence buffers)
Copy decrypted data into the user-provided buffer.
const next_layer_type & next_layer() const
bool has_received_data() const
Check if decrypted data is available in the receive buffer.
const boost::asio::mutable_buffer & input_buffer()
void process_encrypted_data(const boost::asio::const_buffer &read_buffer, boost::system::error_code &ec)
Pass encrypted data to the native handle for processing.
bool shutdown_received() const
Indicates whether a close_notify alert has been received from the peer.
void complete_now(Args &&... args)
References Botan::TLS::detail::AsyncBase< Handler, Executor1, Allocator >::complete_now(), Botan::TLS::Stream< StreamLayer, ChannelT >::copy_received_data(), Botan::TLS::Stream< StreamLayer, ChannelT >::has_received_data(), Botan::TLS::Stream< StreamLayer, ChannelT >::input_buffer(), Botan::TLS::Stream< StreamLayer, ChannelT >::next_layer(), Botan::TLS::Stream< StreamLayer, ChannelT >::process_encrypted_data(), Botan::TLS::Stream< StreamLayer, ChannelT >::shutdown_received(), and Botan::TLS::StreamTruncated.