Skip to main content

Module sse

Module sse 

Source
Expand description

Optimized SSE (Server-Sent Events) parser.

Implements the SSE wire format with event-type interning, BOM stripping, per-event data caps, and an optional async stream adapter gated behind the providers feature.

Structs§

SseEvent
A single parsed SSE event.
SseParser
Incremental SSE parser.

Enums§

SseError
Errors produced while parsing or transporting SSE.

Constants§

MAX_EVENT_DATA_BYTES
Maximum total bytes of accumulated event data before a parse is rejected.
MAX_SSE_BUFFER_BYTES
Maximum bytes the internal parser buffer may hold before feed() rejects. Prevents unbounded memory growth when events are never terminated.
MAX_STREAM_EVENTS
Maximum number of events a single stream adapter will collect.