File indexing completed on 2025-01-18 09:28:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
0012 #define BOOST_ASIO_EXPERIMENTAL_IMPL_CHANNEL_ERROR_IPP
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/asio/experimental/channel_error.hpp>
0020
0021 #include <boost/asio/detail/push_options.hpp>
0022
0023 namespace boost {
0024 namespace asio {
0025 namespace experimental {
0026 namespace error {
0027 namespace detail {
0028
0029 class channel_category : public boost::system::error_category
0030 {
0031 public:
0032 const char* name() const noexcept
0033 {
0034 return "asio.channel";
0035 }
0036
0037 std::string message(int value) const
0038 {
0039 switch (value)
0040 {
0041 case channel_closed: return "Channel closed";
0042 case channel_cancelled: return "Channel cancelled";
0043 default: return "asio.channel error";
0044 }
0045 }
0046 };
0047
0048 }
0049
0050 const boost::system::error_category& get_channel_category()
0051 {
0052 static detail::channel_category instance;
0053 return instance;
0054 }
0055
0056 }
0057 }
0058 }
0059 }
0060
0061 #include <boost/asio/detail/pop_options.hpp>
0062
0063 #endif