Skip to content

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).

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.