The windows specific error code 1236 The network connection was aborted by the local system is equivalent to std::errc::connection_aborted/boost::system::errc::connection_aborted but not to boost::asio::error::connection_aborted.
The network connection was aborted by the local system
1
1
0
Tested with boost 1.83.0-1 in mingw64.
I'm not sure if this is intentional. It seems basic_errors are actually system-dependent error_code (implicitly converted due to is_error_code_enum<basic_error>::type), where as boost::system::errc are implicitly converted to system-independent error_condition (due to is_error_condition_enum) as explained here.
However, as all asio examples (e.g. here) are comparing the error code to basic_errors whereas the referenced boost::system documentation recommends comparing to error_condition I'm a bit confused.
So which comparison is the right way to do it? Is it recommended to use asio's errors over generic system errors?
The windows specific error code 1236
The network connection was aborted by the local system
is equivalent tostd::errc::connection_aborted
/boost::system::errc::connection_aborted
but not toboost::asio::error::connection_aborted
.outputs
Tested with boost 1.83.0-1 in mingw64.
I'm not sure if this is intentional. It seems
basic_errors
are actually system-dependenterror_code
(implicitly converted due tois_error_code_enum<basic_error>::type
), where asboost::system::errc
are implicitly converted to system-independenterror_condition
(due tois_error_condition_enum
) as explained here.However, as all asio examples (e.g. here) are comparing the error code to
basic_errors
whereas the referencedboost::system
documentation recommends comparing toerror_condition
I'm a bit confused.So which comparison is the right way to do it? Is it recommended to use asio's errors over generic system errors?