import { GuaranteedQueue } from "https://deno.land/x/willow@0.3.5/src/wgps/guaranteed_queue.ts";
A FIFO queue which does not emit data until it has received guarantees that the data will be accepted.
https://willowprotocol.org/specs/resource-control/index.html#resource_control_overview
Methods
private
useGuarantees()Use available guarantees to send bytes.
addGuarantees(bytes: bigint)
Add guarantees received from the server.
plead(targetSize: bigint): bigint
Received a plea from the server to shrink the buffer to a certain size.
This implementation always absolves them.
push(bytes: Uint8Array)
Add some bytes to the queue.