11 #if !defined(RESTINIO_USE_BOOST_ASIO)
18 #define RESTINIO_ASIO_VERSION ASIO_VERSION
22 namespace asio_ns = ::asio;
29 return ec == asio_ns::error::operation_aborted;
50 #define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT ASIO_ERROR_CATEGORY_NOEXCEPT
54 #if defined(ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
56 #define RESTINIO_ASIO_HAS_WINDOWS_OVERLAPPED_PTR
62 #include <boost/asio.hpp>
66 #define RESTINIO_ASIO_VERSION BOOST_ASIO_VERSION
73 using namespace ::boost::asio;
74 using error_code = ::boost::system::error_code;
81 return ec == asio_ns::error::basic_errors::operation_aborted;
84 inline bool error_is_eof(
const asio_ns::error_code & ec )
102 #define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT BOOST_SYSTEM_NOEXCEPT
106 #if defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
108 #define RESTINIO_ASIO_HAS_WINDOWS_OVERLAPPED_PTR
127 write_was_not_executed = 100,
132 write_group_destroyed_passively,
139 async_write_call_failed,
168 std::string result{};
171 case asio_convertible_error_t::write_was_not_executed:
172 result.assign(
"write operation was not" );
174 case asio_convertible_error_t::write_group_destroyed_passively:
176 "write group destroyed without external notificato invokation" );
178 case asio_convertible_error_t::async_write_call_failed:
180 "a call to async_write() failed" );
184 "a call to async_read_some_at_call_failed() failed" );
209 inline asio_ns::error_code
221 #if RESTINIO_ASIO_VERSION >= 101700