Minimal Server-Sent Events codec used by the Streamable HTTP transport. Encoder for the server side, incremental parser for the client side.
Summary
Functions
Encode one SSE event as iodata.
Incremental parse: feed a chunk plus the leftover buffer, get completed
events and the new buffer. Multi-line data: fields are joined per spec.
Functions
Encode one SSE event as iodata.
@spec parse(binary(), binary()) :: {[Noizu.MCP.Transport.SSE.Event.t()], binary()}
Incremental parse: feed a chunk plus the leftover buffer, get completed
events and the new buffer. Multi-line data: fields are joined per spec.