Pipelining and the connection loop
Several requests on one socket must be answered in request order, and strictly sequential dispatch makes that ordering impossible to violate. The Connection builds a Response per message and acts on the close verdict.
What you will build
- Explain pipelining and why HTTP/1.1 requires responses in request order.
- Show why awaiting each dispatch before parsing the next makes ordering impossible to violate.
- Modify the Connection to build a Response per message and end the socket only when the verdict says so.