ReliableStreamDecoder

class ReliableStreamDecoder(val maxMessageSize: Long = DEFAULT_MAX_MESSAGE_SIZE)(source)

Splits a TCP or TLS byte stream into messages (RFC 8323 §3.2). Feed it whatever bytes arrive; it returns every message completed so far and keeps the rest.

maxMessageSize bounds the memory one peer can make us hold; set it from the Max-Message-Size this endpoint announces in its CSM (RFC 8323 §5.3.1).

Constructors

Link copied to clipboard
constructor(maxMessageSize: Long = DEFAULT_MAX_MESSAGE_SIZE)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Bytes received but not yet part of a complete message.

Functions

Link copied to clipboard