Using Boost Asio for Modern Async IO
Use Boost.Asio for portable, modern asynchronous I/O.
Boost.Asio
Boost.Asio is the de facto C++ async I/O library. Cross-platform, header-only-ish, used in production by countless services.
The io_context
Asio centers on boost::asio::io_context — the event loop. All async operations run on it.
#include <boost/asio.hpp>
namespace asio = boost::asio;
asio::io_context io;
// register async operations...
io.run();All lessons in this course
- BSD Sockets API in C++
- Building a TCP Echo Server
- Asynchronous IO with epoll and kqueue
- Using Boost Asio for Modern Async IO