FrameWindow class
A per-peer send window: frames go out strictly in order, and at most capacity may be queued or in flight at once.
enqueue returns once the frame is admitted — immediately while the window has room, otherwise only after enough earlier frames have completed. That await is the backpressure: a producer streaming a large changeset to a slow peer pauses instead of buffering without bound.
The strict FIFO order also protects the transport ratchet, whose hash chain assumes frames arrive in the order they were sealed.
Constructors
- FrameWindow({required int capacity})
-
Creates a window admitting at most
capacityoutstanding frames.
Properties
- capacity → int
-
Maximum queued-or-in-flight frames.
final
-
drained
→ Future<
void> -
Completes when every admitted frame has finished sending.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- outstanding → int
-
Frames admitted but not yet completed.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
enqueue(
Future< void> send()) → Future<void> -
Admits
sendinto the window, awaiting room first, and runs it after every previously admitted frame has completed. -
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