The Networking TS in Practice: Testable, Composable Asynchronous I/O in C++
summary
Explains how the Networking TS (Boost.Asio) yields testable, composable async I/O by building a composed operation async_wait_then_write that chains timer wait and guaranteed async_write, using a hand-rolled MockAsyncWriteStream plus an io_context and explicit polling so unit tests run deterministically. Covers executor semantics (dispatch / defer / post), associated_executor and strands to enforce per-connection single-threaded safety, and async_result/use_future to return futures; demonstrates a failing ordering bug that then consistently passes once fixed.
AI-written summary · about
chapters (11)
- 0:00Introduction to Networking TS
- 1:26Problems with current networking code
- 3:37Proactor model explained
- 6:27Writing async heartbeat loop
- 9:39Composed async operations
- 15:18Executors and execution contexts
- 17:46Making code testable and reusable
- 22:47Thread safety and parallelism
- 29:05Customizing completion mechanisms
- 44:48Key takeaways and best practices
- 51:55Q&A session
related talks
59mThe Networking TS in Practice: Patterns for Real World Problems
58mThe Networking TS from Scratch: I/O Objects
01h 01mPractical Patterns with the Networking TS
01h 01mAsynchronous IO with Boost.Asio
04mNetworking TS w/Algorithms
01h 04mNaked coroutines live (with networking)
01h 01mStructured Networking
57mStructured Networking in C++
