The chapter's payoff is reading a chunked response and a length-framed response back to back off one connection, exercising every framing rule and the keep-alive alignment at once.
Read a chunked response then a length-framed response off a single stream in sequence.
This ties the chapter together. The first response is chunked - its body arrives
as 5\r\nhello\r\n0\r\n\r\n and decodes to hello, with the decoder consuming
exactly through the 0\r\n\r\n terminator. That precise stop is what leaves the
stream sitting at the start of the second response, which is length-framed and
reads bye by its Content-Length. Two different framings, one connection, both
clean.
No new code is needed today - if the earlier lessons framed each body exactly, this just works, which is the satisfying proof that the framing rules compose. This is the walking skeleton grown into a real HTTP/1.1 transport: it can send requests and read any response the protocol allows, one after another, over a single stream. From here the project turns to the behaviors layered on top - encodings, redirects, and cookies.
// no new code - this is the integration test. one persistent// connection, two round-trips:// conn := NewConn(stream)// r1, _ := conn.Do(req1) // chunked body -> "hello"// r2, _ := conn.Do(req2) // length-framed -> "bye"// both parse because each body reader stops at its frame boundary.