HTTP 01: The Raw Socket

The stage that turns the four socket calls into a real HTTP reply, and decides when to hang up on a caller who never finishes talking.
Before you start. This series builds a small HTTP server, a program that answers a browser’s request for a page the same way every real website already does. You already opened a real, ordered line between two programs, in Redis 01: The Socket That Answers : a program that waits for other programs to connect, then talks with each one over that connection. That part is reused here unchanged; only what gets said once the call connects is new.