gw-02 — Execution

Prerequisites

  • Go ≥ 1.25 (stdlib only, offline).
  • Optional: nghttp/curl --http2 to generate real captures.

One-shot

cd gw-02-l7-protocols
bash scripts/verify.sh        # vet + build + test -race  → "=== gw-02 OK ==="

Per-language workflow (Go)

cd gw-02-l7-protocols/src/go
go test -race -count=1 ./...      # 10 tests in package h2
go build -o /tmp/h2inspect ./cmd/h2inspect

Use the frame inspector

# Pipe any raw HTTP/2 byte stream (h2c / prior-knowledge) into it:
/tmp/h2inspect -f capture.bin
# or:  some-h2-source | /tmp/h2inspect

It prints a frame-by-frame trace, decodes non-Huffman HEADERS, marks Huffman header blocks, and lists the multiplexed stream set.

What's in the package

FileWhat
h2/frame.goframe read/write, types, flags, multiplex-friendly parsing
h2/hpack.goHPACK integer/string coding, static+dynamic table, encoder
h2/flow.gotwo-level (stream+connection) flow-control accounting
h2/demux.goper-stream state machine = multiplexing made visible
cmd/h2inspectCLI frame/header inspector

See GUIDE.md for the full walkthrough and the gRPC LB-trap and HTTP/3 deep dives.