Package dev.relism.flash.http2.frame
package dev.relism.flash.http2.frame
-
ClassDescriptionThe frame-header flag bits (RFC 9113 §6), as bitwise constants plus predicate helpers.A flyweight over one frame's 9-byte header plus its payload location, both still living in
Http2FrameReader's own read buffer.The 10 HTTP/2 frame types (RFC 9113 §6), plus the shared per-type validation rulesFrameValidatorenforces.Whether a frame type requires stream id 0, requires it non-zero, or permits either.Table-driven RFC 9113 per-frame-type validation: length bounds, the stream-id required/forbidden/either rule, and the two special-cased structural rules (SETTINGS' multiple-of-6 length,PUSH_PROMISEalways rejected from a client) that do not fit a class is the code that reads it.Serializes HTTP/2 frames into aByteWriterscratch buffer with the standard length-back-patching technique:FrameWriteBuffer.beginFrame(dev.relism.flash.http2.frame.FrameType, int, int)writes a 9-byte header with a placeholder length, the caller writes the payload directly throughFrameWriteBuffer.writer()(the sameByteWriter), andFrameWriteBuffer.endFrame()rewrites the length once it is known — the payload size is rarely known before it is serialized (an HPACK-encoded header block, in particular, has no cheap way to be measured in advance).Reads length-prefixed HTTP/2 frames from one connection'sBufferedByteSource.The one component every HTTP/2 write in this codebase passes through — connection frames and stream frames alike (both are justWriteIntents).What a frame's serialized bytes are ultimately written to.RFC 9113 §6.1 (DATA) / §6.2 (HEADERS) padding."Serialize yourself, then hand me the finished bytes."