blackbull.client.response¶
blackbull.client.response
¶
Client-side responders: react to incoming HTTP/2 frames.
Each Responder subclass handles one FrameTypes value. respond()
delegates the protocol-level state mutation back to the owning
HTTP2Client via underscore-prefixed callbacks (_on_response_headers,
_on_response_data, …) so the client owns its state and the responders
stay thin dispatchers.
The dispatch table is built once via __init_subclass__ so
ResponderFactory.create(frame) is O(1).
PushPromiseResponder
¶
Bases: Responder
The client consumes no push, but a promise is never merely skipped.
Its field block arrives here already decoded — RFC 9113 §4.3 requires
that even for a frame to be discarded, because the HPACK table is
connection-wide and a block left unread leaves every later block on the
connection decoding against a table missing its insertions, which is
silent corruption rather than an error. CONTINUATION never reaches a
responder at all: HTTP2Client._absorb_field_block folds it into the
frame that opened the block.
Responder
¶
Base class for client-side reactions to an incoming HTTP/2 frame.
Subclasses set FRAME_TYPE and implement respond(client).
__init_subclass__ registers each concrete subclass keyed on its
FRAME_TYPE so ResponderFactory.create can dispatch by type.
ResponderFactory
¶
Looks up the Responder for an incoming frame type and instantiates it.