Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ReadableByteStreamController

Allows control of a readable byte stream's state and internal queue.

Hierarchy

  • ReadableByteStreamController

Index

Accessors

byobRequest

desiredSize

  • get desiredSize(): null | number
  • Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure.

    Returns null | number

Methods

close

  • close(): void
  • Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed.

    Returns void

enqueue

  • enqueue(chunk: ArrayBufferView): void
  • Enqueues the given chunk chunk in the controlled readable stream. The chunk has to be an ArrayBufferView instance, or else a TypeError will be thrown.

    Parameters

    • chunk: ArrayBufferView

    Returns void

error

  • error(e?: any): void
  • Errors the controlled readable stream, making all future interactions with it fail with the given error e.

    Parameters

    • Optional e: any

    Returns void

Generated using TypeDoc