11 #ifndef ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_HPP 12 #define ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if !defined(ASIO_ENABLE_OLD_SSL) 22 #endif // !defined(ASIO_ENABLE_OLD_SSL) 30 #if !defined(ASIO_ENABLE_OLD_SSL) 32 template <
typename ConstBufferSequence>
37 const ConstBufferSequence&
buffers)
46 std::size_t& bytes_transferred)
const 48 typename ConstBufferSequence::const_iterator iter = buffers_.begin();
49 typename ConstBufferSequence::const_iterator
end = buffers_.end();
50 std::size_t accumulated_size = 0;
56 || bytes_transferred == total_buffer_size_)
65 if (bytes_transferred >= accumulated_size +
buffer_size(buffer))
75 if (bytes_transferred > accumulated_size)
76 buffer = buffer + (bytes_transferred - accumulated_size);
88 template <
typename Handler>
91 const std::size_t& bytes_transferred)
const 93 handler(ec, bytes_transferred);
98 ConstBufferSequence buffers_;
99 std::size_t total_buffer_size_;
102 #endif // !defined(ASIO_ENABLE_OLD_SSL) 110 #endif // ASIO_SSL_DETAIL_BUFFERED_HANDSHAKE_OP_HPP
Holds a buffer that cannot be modified.
ASIO_DECL want handshake(stream_base::handshake_type type, asio::error_code &ec)
mutable_buffers_1 buffer(const mutable_buffer &b)
Create a new modifiable buffer from an existing buffer.
buffered_handshake_op(stream_base::handshake_type type, const ConstBufferSequence &buffers)
std::size_t buffer_size(const mutable_buffer &b)
Get the number of bytes in a modifiable buffer.
handshake_type
Different handshake types.
const MutableBufferSequence & buffers
Class to represent an error code value.
engine::want operator()(engine &eng, asio::error_code &ec, std::size_t &bytes_transferred) const
void call_handler(Handler &handler, const asio::error_code &ec, const std::size_t &bytes_transferred) const
ASIO_DECL asio::const_buffer put_input(const asio::const_buffer &data)
SocketService Iterator Iterator end