Book review: Boost.Asio C++ Network Programming

I started using Boost.Asio years ago for my professional occupation. I remember difficult hours trying to understand its help and its tutorials. Would that have been different with the book?

Content and opinions

The book is not very long, and it follows the tutorial on Boost ASIO website.

It begins with an introduction if what ASIO is about, the difference between synchronous and asynchronous, exception and error codes… It also introduces the non network parts of ASIO. The second chapter introduces the API and so the implementation of the introduction concepts. As the API is quite small, it is easy to have everything sum up at the beginning of the book.

The next three chapters are the core of the book. They describe the tutorials available online with much-needed explanations. The first example is the usual Echo client/server in UDP and TCP mode. They address the basic understanding of network, then the second example describes a more complex application with several states. It is still synchronous, and as such easy to understand. Then the last example takes asynchronous in the picture. This is the step that is the most useful, and this is what you should usually implement. I read the chapter several times so that I understood how everything works together, how the buffers needed to be implemented…

The last two chapters are a little less useful. Mainly I never used streams and coroutines, and I favor portable applications so I never used any Windows or Linux specific code.

Conclusion

Even if the examples are basically the official tutorials, the amount of additional knowledge makes it the essential help to Boost.Asio. Period.

Leave a Reply