For me, main advantage of Boost. Asio (besides cross-platform work) is, that on each platform, it uses most effective strategy ( epoll on Linux 2.6, kqueue on FreeBSD/MacOSX, Overlapped IO on MS Windows).
Ultimately, you should learn both. But STL can be learned in isolation, whereas boost won't make much sense until you understand the STL, since that's what Boost is modeled on, and designed to extend. So learn to use the STL as part of learning c++.
After 20 years of active Boost development, it's now recognized as a very powerful C++ library, for each major version many C++ libraries from the community were added. The Boost reviewers have an advanced C++ skills and their contributions guarantee a high quality for many years.
Boost. Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach.
Some nice documentation on boost including a chapter on asio can be found in a (free) boost book at http://en.highscore.de/cpp/boost/index.html. The chapter on asio provides a general overview and then goes as far as how to develop your own custom asio extensions. Really fantastic effort by Boris Schäling!
First, I've been using Boost.Asio for quite a while already -- and I share your concern. To address your question:
There are efforts (not part of Boost.Asio) to expose a lot of the functionality and possible alternative use cases. This at best is scattered around the web in blogs and other forms of non-packaged documentation.
One thing that is unclear and which will really need close coordination with the author and developers of the Boost.Asio library would be as far as extending and customizing it for a specific platform or adding specific new functionality. This should be improved though but the good thing is it's looking like Asio will be a reference implementation for a standard library technical report (for an asynchronous IO library in the STL) in the future.
I wrote two small articles that could be used as introductions to boost.asio. They are available from my site
NOTE: I have contacted gamedev.net to let them know about the formatting issues. Unfortunately at the time of writing this comment, this resource is more difficult to recommend because of some changes with their website which hide/delete the #include statements + a missing .zip file resource.
A relatively new and very good beginner tutorial for Boost.Asio (which also introduces how to use it effectively with bind, shared_ptr, and threads) can be found here:
http://www.gamedev.net/blog/950/entry-2249317-a-guide-to-getting-started-with-boostasio?pg=1
Note: If you're using c++0x features many of the simple uses of bind for creating a functor can be replaced with lambdas, and shared_ptr/bind are also available in the latest version of visual studio (or gcc which also includes threads.)
When I was searching for documentation or a tutorial this question kept popping up at the top of search results, so it is important to keep it updated as new tutorials come around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With