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 6. Boost.Asio – Other Features

Here we'll see some of the not-so-well-known features of Boost.Asio. The std streams and streambuf objects are sometimes a bit more complicated to use, but as you'll see, they bring their own benefits to the table. Finally, you'll see a rather late entry to Boost.Asio's co-routines, which allow you to have a code that is asynchronous but is easy to read (as if it was synchronous). It's quite an amazing feature!

std streams and std buffer I/O

You should be familiar with STL streams and STL streambuf objects in order to read this section.

Boost.Asio allows for two types of buffers when dealing with I/O:

  • boost::asio::buffer(): This buffer surrounds a Boost.Asio operation (the buffers we use are passed to the Boos.Asio ...

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