Files
Flash5/flash/docs/http2/README.md
T

2.6 KiB

HTTP/2 in Flash

Flash treats HTTP/1.1 and HTTP/2 as peer transports behind one connection boundary. TLS ALPN or the cleartext prior-knowledge preface selects a protocol once; both paths then feed the same router, Request, Response, handler, trailer, streaming and WebSocket APIs. HTTP/2 adds a bounded frame decoder, HPACK codec, stream state machine, two-level flow control and one serialized writer per connection. Application code does not branch on the wire protocol.

The implementation is deliberately layered:

listener / TLS
    -> protocol negotiation
        -> HTTP/1.1 parser ---------+
        -> HTTP/2 frames + HPACK ----+-> shared request model -> router -> handler
                                         shared response model
        <- HTTP/1.1 serializer -----+
        <- HTTP/2 stream writer ----+

Start here

Wire internals

  • Byte primitives — reusable views, scanning and bounded slice lifetimes.
  • Serialized writer — the single-owner output path and contention model.
  • Frames — frame parsing, validation and error scope.
  • HPACK — integer/Huffman coding and static/dynamic table ownership.

Operate and verify

  • Security — every HTTP/2 limit, default and abuse control.
  • Troubleshooting — GOAWAY/RST_STREAM diagnosis and protocol tracing.
  • Compliance — h2spec, interoperability, fuzzing and deliberate omissions.
  • Performance and CI baselines — measurements and regression gates, including the comparison with nghttpd.

Design history

Decisions records non-obvious trade-offs and rejected alternatives. The implementation plan is retained as historical engineering evidence; it is not required to use or extend the runtime.