File indexing completed on 2025-01-18 09:29:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP
0012 #define BOOST_ASIO_SSL_DETAIL_HANDSHAKE_OP_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019
0020 #include <boost/asio/ssl/detail/engine.hpp>
0021
0022 #include <boost/asio/detail/push_options.hpp>
0023
0024 namespace boost {
0025 namespace asio {
0026 namespace ssl {
0027 namespace detail {
0028
0029 class handshake_op
0030 {
0031 public:
0032 static constexpr const char* tracking_name()
0033 {
0034 return "ssl::stream<>::async_handshake";
0035 }
0036
0037 handshake_op(stream_base::handshake_type type)
0038 : type_(type)
0039 {
0040 }
0041
0042 engine::want operator()(engine& eng,
0043 boost::system::error_code& ec,
0044 std::size_t& bytes_transferred) const
0045 {
0046 bytes_transferred = 0;
0047 return eng.handshake(type_, ec);
0048 }
0049
0050 template <typename Handler>
0051 void call_handler(Handler& handler,
0052 const boost::system::error_code& ec,
0053 const std::size_t&) const
0054 {
0055 static_cast<Handler&&>(handler)(ec);
0056 }
0057
0058 private:
0059 stream_base::handshake_type type_;
0060 };
0061
0062 }
0063 }
0064 }
0065 }
0066
0067 #include <boost/asio/detail/pop_options.hpp>
0068
0069 #endif