ReadBuffer

Buffers a continuous stdio stream into discrete JSON-RPC messages.

A single newline-terminated frame may not exceed an internal size cap (16 MiB): a peer that streams bytes without ever sending a newline triggers a TooLongFrameException from readMessage instead of growing the buffer without bound. A non-positive cap disables the check.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun append(chunk: ByteArray)

Appends raw bytes to the internal buffer for subsequent message parsing.

Link copied to clipboard
fun clear()

Clears all buffered data, discarding any partially received messages.

Link copied to clipboard

Reads and deserializes a JSON-RPC message from the input buffer.