FramerBorrowedBytes class final

Incremental framing driver that delivers frames as FrameBorrowedView.

This is an opt-in, high-throughput API intended for synchronous consumers. It may return borrowed views into the internal RingBuffer.

If you need safe, storable frames, use Framer or Stream.decodeFrames* which yield owned copies.

Constructors

FramerBorrowedBytes(BorrowedBytesCodec codec, {int capacity = 64 * 1024})

Properties

buffer RingBuffer
no setter
capacity int
no setter
codec BorrowedBytesCodec
final
hashCode int
The hash code for this object.
no setterinherited
length int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(List<int> chunk, void onFrame(FrameBorrowedView frame)) → void
Add a chunk of bytes, decoding any complete frames.
close(void onFrame(FrameBorrowedView frame), {bool allowTrailingBytesAtEof = false}) → void
Finish decoding at EOF.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited