blob: 863bf4e0d44398b2297adfc5da98e5594d10abaa (
plain) (
tree)
|
|
event_stream_parser is a lightweight, fully spec-compliant parser for the event
stream format.
It only deals with the parsing of events and not any of the client/transport
aspects. This is not a Server-sent Events (SSE) client.
Under the hood, it's a stateful parser that receives chunks (that are received
from an HTTP client, for example) and emits events as it parses them. But it
remembers the last event id and reconnection time and keeps emitting them as
long as they are not overwritten by new ones.
BOM stripping is left as a responsibility of the chunk provider.
|