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
168 std::string result{};
172 result.assign(
"write operation was not" );
176 "write group destroyed without external notificato invokation" );
180 "a call to async_write() failed" );
184 "a call to async_read_some_at_call_failed() failed" );
209inline asio_ns::error_code
221#if RESTINIO_ASIO_VERSION >= 101700
#define RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT
Error category for asio compatible error codes.
virtual std::string message(int value) const override
virtual const char * name() const RESTINIO_ERROR_CATEGORY_NAME_NOEXCEPT override
const auto & system_category()
asio_ns::executor default_asio_executor
bool error_is_operation_aborted(const asio_ns::error_code &ec) noexcept
asio_convertible_error_t
Enum for restinio errors that must presented as asio_ns::error_code value.
@ write_was_not_executed
After write notificator error: data was not sent, connection closed (or aborted) before a given piece...
@ async_read_some_at_call_failed
A call to async_read_some_at failed. The corresponding sendfile operation wasn't done.
@ write_group_destroyed_passively
After write notificator error: a notificator was set for a write_group_t but no external invokation h...
@ async_write_call_failed
A call to async_write failed. The corresponding write operation wasn't done.
bool error_is_eof(const asio_ns::error_code &ec) noexcept
asio_ns::error_category error_category_base_t
An alias for base class of error category entity.
asio_ns::error_code make_asio_compaible_error(asio_convertible_error_t err) noexcept
Make restinio error_code compatible with asio_ns::error_code.
const error_category_base_t & restinio_err_category()
Get restinio error category.