Reassembler

Per-endpoint reassembler. Feed decoded chunks in arrival order; feed returns the complete payload once all chunks for a message have arrived.

Not thread-safe — use one instance per endpoint, accessed from one coroutine.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Feed one decoded chunk. Returns the complete reassembled payload when all DecodedChunk.chunkCount chunks have arrived, or null while waiting.

Link copied to clipboard
fun reset()

Discard all in-progress state (e.g. on endpoint disconnect).