Asio without Boost

Is Asio still separate from Boost, or is Boost.Asio the only version that is still being updated?

On the Asio website, they say that there are benefits to both versions, and that Asio is updated more often than Boost. However, the latest version of dev on the site is 1.5.3, released in March 2011, while the latest version of Boost 1.53 from February 2013 includes Asio 1.8.3 with a lot of changes from 1.5.3.

Either the Asio website has been left without notice in favor of Boost-only updates, or it has moved to some place that I have not found. Does anyone know what happened?

I ask that I try to cut Boost from my project, and Boost.Asio is the only Boost library that I am currently using. Asio itself is a header-only library, but Boost.Asio retrieves several other Boost libraries (System, Regex, Date_Time) that are otherwise not used.

I would like to switch to another lightweight socket library, but have not yet found it as good as Asio (in terms of low dependencies and using native methods of the iocp / epoll platform).

+6
source share
2 answers

I asked via email where the non-productive version is supported, and author Christopher Kochhoff said he supports this on github

https://github.com/chriskohlhoff/asio

Looking at it today, it looks like 1.8.3 is there, or at least it wasn’t tagged, so it may be that it has stopped supporting this repo.

+3
source

Asio is developed separately, then activated and integrated into Boost.Asio. However, you cannot remove Boost from your project based on what functions and compiler are used. Starting with Asio 1.10.0, Asio has been trying to use the equivalent C ++ 11 standard libraries instead of Boost.

Asio is basically Boost.Asio:

  • No limits on Boost namespaces and macros.
  • It is independent of Boost.System and Boost.Thread, since Asio provides its limited functionality instead of these two libraries.

For Asio versions prior to 1.10.0, Boost dependencies may exist. These dependencies are often introduced in patterns; thus, a dependency can only occur when an application uses certain functions. It's easy to overlook the subtle details on the > Asio and Boost.Asio page , where it says:

Asio has only a file header, and for most uses it does not require linking with any Boost library. When using C ++ 11 with the latest versions of gcc, clang or MSVC, Asio can be used independently of Boost by defining ASIO_STANDALONE during compilation.

In general, the following functions include dependencies:

  • Timers depend on Boost.DateTime or Boost.Chrono. For Asio 1.10.0 and later, C ++ 11 builds will be used using std::chrono . Operations
  • read_until() , which use regex, is dependent on Boost.Regex.
  • Stackful coroutines that are based on Boost.Coroutine .

Perhaps you should consider using:

  • BCP to extract the subset of Boost libraries needed for your project.
  • libuv , a C library that provides an asynchronous event loop and abstracts from I / O based event notification. This answer compares two libraries.
+6
source

All Articles