Evolving C++ Networking with Senders & Receivers [part 1]
summary
Claim: std::execution in C++26 is a minimal framework that can be bootstrapped into a real networking stack. Demonstrates building an senders & receivers epoll-based context (no io_uring) that returns latent operation states from connect/start, uses operationfd/eventfd for stop requests, intrusive linked lists to avoid heap allocations, oneshot registrations to prevent duplicate completions, and careful move-by-value receiver semantics. Code-level details and error paths are implemented and tested; the context run loop drives completions and stop semantics and the example works end-to-end.
AI-written summary · about
chapters (19)
- 0:00Introduction to good code
- 2:32Decomposing function calls
- 5:02Senders and receivers ecosystem
- 8:55Receiver contract explained
- 11:02Synchronous to async mapping
- 14:52Late binding with let_value
- 16:16Asynchronous cancellation
- 19:43Parallelism vs concurrency
- 21:29Building an async networking server
- 23:35Linux EPOLL API basics
- 26:23EPOLL context implementation
- 31:39Operation state lifecycle
- 34:07Handling EPOLL edge cases
- 37:16Implementing run function
- 40:05Adding stop token support
- 44:59Stop callback management
- 47:25Dispatching stop requests
- 49:10Abstracting file descriptors
- 50:51Q&A on EPOLL and stop tokens
