import { Writable } from "@astronautlabs/bitstream"; /** * Implements the acknowledgement behavior specified by the RTMP specification. * Bytes written to this writable will be immediately flushed to the underlying writable * until the number of bytes written surpasses the configured window size. When that happens, * the bytes will be buffered until acknowledge() is called. */ export declare class AcknowledgedWritable implements Writable { private writable; constructor(writable: Writable); buffer: Uint8Array; bufferOffset: number; acknowledgedOffset: number; private _bufferSize; private _windowSize; /** * How many times larger than the window size the buffer size shall be. Need not be integer. */ bufferFactor: number; /** * Size of the allocated windowing buffer. * This is the maximum amount of bytes which can be stored while waiting for an acknowledgement. * This is */ get bufferSize(): number; /** * Gets/sets window acknowledgement size for this writable. */ get windowSize(): number; /** * When setting the current acknowledgement window size, the underlying storage buffer * is also reallocated based on the bufferFactor property. */ set windowSize(value: number); resizeBuffer(size: number): void; /** * How many bytes have been sent without a corresponding acknowledgement. */ unacknowledged: number; acknowledge(sequenceNumber: number): void; write(chunk: Uint8Array): void; /** * Flush whatever contents of the buffer we can based on our state */ private flush; }