Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards


Using I/O

This library makes I/O primitives used by the implementation publicly available so users can take advantage of them in their own libraries. These primitives include traits, buffers, buffer algorithms, files, and helpers for implementing asynchronous operations compatible with Boost.Asio and described in N3747. This section lists these facilities by group, with descriptions.

[Important] Important

This documentation assumes familiarity with Boost.Asio. Sample code and identifiers used throughout are written as if the following declarations are in effect:

#include <boost/beast/core.hpp>
#include <boost/asio.hpp>
#include <iostream>
#include <thread>
using namespace boost::beast;

boost::asio::io_context ioc;
auto work = boost::asio::make_work_guard(ioc);
std::thread t{[&](){; }};

error_code ec;
boost::asio::ip::tcp::socket sock{ioc};