mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-07-24 11:12:50 +02:00
47 lines
1.6 KiB
Text
47 lines
1.6 KiB
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* Source: https://streams.spec.whatwg.org/#rs-class-definition
|
|
*/
|
|
|
|
[Exposed=(Window,Worker,Worklet), Transferable]
|
|
interface ReadableStream {
|
|
constructor(optional object underlyingSource, optional QueuingStrategy strategy = {});
|
|
|
|
readonly attribute boolean locked;
|
|
|
|
Promise<undefined> cancel(optional any reason);
|
|
ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {});
|
|
ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {});
|
|
Promise<undefined> pipeTo(WritableStream destination, optional StreamPipeOptions options = {});
|
|
sequence<ReadableStream> tee();
|
|
|
|
async iterable<any>(optional ReadableStreamIteratorOptions options = {});
|
|
};
|
|
|
|
typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;
|
|
|
|
enum ReadableStreamReaderMode { "byob" };
|
|
|
|
dictionary ReadableStreamGetReaderOptions {
|
|
ReadableStreamReaderMode mode;
|
|
};
|
|
|
|
dictionary ReadableStreamIteratorOptions {
|
|
boolean preventCancel = false;
|
|
};
|
|
|
|
dictionary ReadableWritablePair {
|
|
required ReadableStream readable;
|
|
required WritableStream writable;
|
|
};
|
|
|
|
dictionary StreamPipeOptions {
|
|
boolean preventClose = false;
|
|
boolean preventAbort = false;
|
|
boolean preventCancel = false;
|
|
AbortSignal signal;
|
|
};
|