Asynchronous IO Using Boost.Asio
summary
Explains concrete Boost.Asio patterns: use of timers to show one-thread vs two-thread behavior, strand serializes handlers to avoid races, and shared_from_this lifetime pattern to keep connection objects alive until callbacks finish. Shows buffer and scatter/gather APIs, streambuf for framed reads, async_accept handing sockets to per-connection handlers, and using post as a threadpool. Demonstrates combining Asio with Spirit/Karma for parsing/serialization and recommends canceling outstanding IO to let dead clients be destroyed.
AI-written summary · about
chapters (5)
- 0:00Start
- 15:59create two deadline timers
- 32:07create an azo generic server
- 35:14add your own error handling
- 45:08putting weak pointers on the i / o cue
related talks
32mTechniques for writing concurrent applications with asynchronous I/O
45mAsynchrony and Coroutines
29mAsychronous programming in Rust
18mA better way of doing Async Rust
30mWriting High Performance Async IO Apps
29mI/O in Rust: the whole story
06mZero-copy Transfers with io_uring and Rust
36masync/await with async-std
