O'Reilly logo

Boost.Asio C++ Network Programming by John Torjo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Boost.Asio Fundamentals

In this chapter, we'll cover what you definitely need to know when using Boost.Asio. We'll delve deeper into asynchronous programming, which is trickier than synchronous and is much more fun.

The Network API

This section shows what you definitely need to know in order to write a networking application using Boost.Asio.

Boost.Asio namespaces

Everything in Boost.Asio resides in the boost::asio namespace, or a sub-namespace of that:

  • boost::asio: This is where core classes and functions reside. The important classes are io_service and streambuf. Here, we also have the free functions, such as read, read_at, read_until, their asynchronous counterparts, and their write and asynchronous write counterparts.
  • boost::asio::ip ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required