Tinkex.Streaming.SSEDecoder (Tinkex v0.3.4)

View Source

Minimal SSE decoder that can be fed incremental chunks.

Summary

Functions

Feed a binary chunk into the decoder, returning parsed events and updated state.

Create a new decoder.

Types

t()

@type t() :: %Tinkex.Streaming.SSEDecoder{buffer: binary()}

Functions

feed(decoder, chunk)

@spec feed(t(), binary()) :: {[Tinkex.Streaming.ServerSentEvent.t()], t()}

Feed a binary chunk into the decoder, returning parsed events and updated state.

new()

@spec new() :: t()

Create a new decoder.