Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.54 KB

File metadata and controls

30 lines (21 loc) · 1.54 KB

ReadableByteStreamController

Namespace: SpawnDev.SpawnJS.JSObjects
Inherits: SpawnJSObject
Source: JSObjects/ReadableByteStreamController.cs
MDN Reference: ReadableByteStreamController on MDN

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.>br /> https://developer.mozilla.org/en-US/docs/Web/API/ReadableByteStreamController

Constructors

Signature Description
ReadableByteStreamController(SpawnJSObjectReference _ref) Deserialization constructor

Properties

Property Type Access Description
ByobRequest ReadableStreamBYOBRequest? get Returns the current BYOB pull request, or null if there no outstanding request.
DesiredSize int get Returns the desired size required to fill the stream's internal queue. Note that this can be negative if the queue is over-full.

Methods

Method Return Type Description
Close() void Closes the associated stream.
Enqueue(object chunk) void Enqueues a given chunk in the associated stream.
Error(object errorObject) void Any object that you want future interactions to fail with.