domains / families / software-engineering / boost-asio-pro
boost-asio-pro
authentic
Use when writing asynchronous C++ networking code with Boost.Asio or standalone Asio — TCP/UDP servers and clients, SSL/TLS, timers, strands, composed async ops. Covers io_context, co_spawn, awaitable, async_read/async_write, asio::spawn, yield_context, and pre-C++20 callback styles.
When to use
- Use when writing or reviewing async C++ networking code with Boost.Asio or standalone Asio: TCP/UDP servers and clients, SSL/TLS streams, timers, resolvers.
- Use when the code involves `io_context`, `io_service`, `co_spawn`, `awaitable`, `async_read`, `async_write`, `strand`, `asio::spawn`, `yield_context`, or completion-handler callbacks.
- Use when the target toolchain is old: an older Boost or a pre-C++20 standard, where coroutine examples will not compile.
- Use when async code compiles but misbehaves: interleaved writes, dangling buffers, sockets closing early, `operation_aborted` treated as an error.
When not to use
- This skill does not replace compiling and testing against the target toolchain. The version floors it documents are only real once built — build the code.
- It does not cover Boost.Beast (HTTP/WebSocket), io_uring backends, or UDP multicast specifics.
- Stop and ask when the Boost version and C++ standard cannot be determined; the style choice depends on them.
Skill page
Source