@shazow/whatsabi
    Preparing search index...

    Interface ReadableByteStreamController

    The ReadableByteStreamController interface of the Streams API represents a controller for a readable byte stream. It allows control of the state and internal queue of a ReadableStream with an underlying byte source, and enables efficient zero-copy transfer of data from the underlying source to a consumer when the stream's internal queue is empty.

    MDN Reference

    interface ReadableByteStreamController {
        byobRequest: ReadableStreamBYOBRequest | null;
        desiredSize: number | null;
        close(): void;
        enqueue(chunk: ArrayBufferView<ArrayBuffer>): void;
        error(e?: any): void;
    }
    Index
    • The close() method of the ReadableByteStreamController interface closes the associated stream.

      MDN Reference

      Returns void

    • The enqueue() method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is transferred into the stream's internal queues).

      MDN Reference

      Parameters

      Returns void

    • The error() method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.

      MDN Reference

      Parameters

      • Optionale: any

      Returns void

    byobRequest: ReadableStreamBYOBRequest | null

    The byobRequest read-only property of the ReadableByteStreamController interface returns the current BYOB request, or null if there are no pending requests.

    MDN Reference

    desiredSize: number | null

    The desiredSize read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its "desired size".

    MDN Reference