StaticResponse
struct StaticResponseA pair of pre-encoded HTTP/1.1 response buffers.
keepalive_bytes is emitted when the connection will stay open
after this response; close_bytes is emitted when the server has
decided to close after this write (HTTP/1.0 without keep-alive,
explicit Connection: close request, max_keepalive_requests
cap reached, or server shutdown).
Both buffers end at the final body byte; the reactor concatenates nothing — it copies the buffer verbatim into the socket write queue.
Implements Copyable, Movable
- Fields
keepalive_bytes: List[UInt8]close_bytes: List[UInt8]body_length: Int: Exposed so the config-gate logic (e.g.Content-Length > max_body_size) can re-check the precomputed size if it ever needs to — the reactor only readskeepalive_bytes/close_bytes.
__init__
def __init__(out self, var keepalive_bytes: List[UInt8], var close_bytes: List[UInt8], body_length: Int) copy
def copy(self) -> Self