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.

30 minsrc/connection.js
  • 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.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth