File indexing completed on 2025-12-16 09:43:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
0012 #define BOOST_ASIO_EXPERIMENTAL_CHANNEL_ERROR_HPP
0013
0014 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
0015 # pragma once
0016 #endif
0017
0018 #include <boost/asio/detail/config.hpp>
0019 #include <boost/system/error_code.hpp>
0020
0021 #include <boost/asio/detail/push_options.hpp>
0022
0023 namespace boost {
0024 namespace asio {
0025 namespace experimental {
0026 namespace error {
0027
0028 enum channel_errors
0029 {
0030
0031 channel_closed = 1,
0032
0033
0034 channel_cancelled = 2
0035 };
0036
0037 extern BOOST_ASIO_DECL
0038 const boost::system::error_category& get_channel_category();
0039
0040 static const boost::system::error_category&
0041 channel_category BOOST_ASIO_UNUSED_VARIABLE
0042 = boost::asio::experimental::error::get_channel_category();
0043
0044 }
0045 namespace channel_errc {
0046
0047 using error::channel_closed;
0048 using error::channel_cancelled;
0049 }
0050 }
0051 }
0052 }
0053
0054 namespace boost {
0055 namespace system {
0056
0057 template<> struct is_error_code_enum<
0058 boost::asio::experimental::error::channel_errors>
0059 {
0060 static const bool value = true;
0061 };
0062
0063 }
0064 }
0065
0066 namespace boost {
0067 namespace asio {
0068 namespace experimental {
0069 namespace error {
0070
0071 inline boost::system::error_code make_error_code(channel_errors e)
0072 {
0073 return boost::system::error_code(
0074 static_cast<int>(e), get_channel_category());
0075 }
0076
0077 }
0078 }
0079 }
0080 }
0081
0082 #include <boost/asio/detail/pop_options.hpp>
0083
0084 #if defined(BOOST_ASIO_HEADER_ONLY)
0085 # include <boost/asio/experimental/impl/channel_error.ipp>
0086 #endif
0087
0088 #endif