Creating a Sender/Receiver HTTP Server for Asynchronous Operations in C++
summary
Builds a working asynchronous HTTP server using the sender/receiver framework with a coroutine task and an async scope, running multiple clients on a single thread via an IO context. Uses the SD exec implementation (stexac by NVIDIA) and a minimal networking sender proposal, implements read/resize logic, a five second timeout that cancels stalled connections, and a shutdown endpoint. Demo compiles with a few minor bugs but completes a basic server and a client in about 40 minutes.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:17Motivation for HTTP server
- 3:46Asynchronous server design
- 8:23Coroutine server skeleton
- 13:48TCP listener with coroutines
- 21:01Async client connections
- 24:30Incremental HTTP parsing
- 31:06Request processing and responses
- 35:19Sender performance optimizations
- 40:51Timeout for connections
- 53:20Clean server shutdown
- 1:06:19Simple HTTP client
- 1:19:44Q&A
related talks
57mStructured Networking in C++
01h 01mStructured Networking
01h 01mAsynchronous IO with Boost.Asio
01h 04mNaked coroutines live (with networking)
58mThe Networking TS in Practice: Testable, Composable Asynchronous I/O in C++
49mNeed for ASYNC: in pursuit of scalable internet-scale applications
22mEvent driven networking for Swift
01h 14mHow to Use C++20 Coroutines for Networking
