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_SHUTDOWN_OP_HPP
0012 #define BOOST_ASIO_SSL_DETAIL_SHUTDOWN_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 shutdown_op
0030 {
0031 public:
0032 static constexpr const char* tracking_name()
0033 {
0034 return "ssl::stream<>::async_shutdown";
0035 }
0036
0037 engine::want operator()(engine& eng,
0038 boost::system::error_code& ec,
0039 std::size_t& bytes_transferred) const
0040 {
0041 bytes_transferred = 0;
0042 return eng.shutdown(ec);
0043 }
0044
0045 template <typename Handler>
0046 void call_handler(Handler& handler,
0047 const boost::system::error_code& ec,
0048 const std::size_t&) const
0049 {
0050 if (ec == boost::asio::error::eof)
0051 {
0052
0053
0054
0055 static_cast<Handler&&>(handler)(boost::system::error_code());
0056 }
0057 else
0058 {
0059 static_cast<Handler&&>(handler)(ec);
0060 }
0061 }
0062 };
0063
0064 }
0065 }
0066 }
0067 }
0068
0069 #include <boost/asio/detail/pop_options.hpp>
0070
0071 #endif