Boost logo

Boost Users :

Subject: Re: [Boost-users] Convert asio::error_code into boost::system::error_code
From: Igor R (boost.lists_at_[hidden])
Date: 2012-03-22 07:20:37


> I'm in a usecase, where we use a library, which brings its own asio lib with it:
> http://www.resiprocate.org/ReTurn_Overview
> If this is correct, they're using asio 1.2 in its header only version.
>
> I've build an API which uses boost::asio to send data over the network.
> One of our goals is now, to also include stun/turn, so we have to use this library.
>
> To enable the errorreporting, I need to convert the asio::error_code coming from reTurn to boost::system::error_code, so that I can call my notify method with it:
> void notifyError(const boost::system::error_code& ec);
>
> any expierence in this? The constructors don't seem to fit, as error_category is in asio a enum, and in boost::system a class f.e.

Just thinking out loud: wouldn't it be better to port the above
library to a newer boost and boost.asio? It should take very little
effort, but might result in much better interoperability, more simple
further support, and better performance and stability (as a lot of
things were fixed and improved since asio 1.2).


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net