WebTransportReceiveStream

The WebTransportReceiveStream interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream. Available only in secure contexts.

MDN Reference

Properties

Link copied to clipboard

The locked read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.

Functions

Link copied to clipboard
inline suspend fun <R : ERROR CLASS: Symbol not found for JsAny??> ReadableStream<R>.cancel()
inline suspend fun <R : ERROR CLASS: Symbol not found for JsAny??> ReadableStream<R>.cancel(reason: JsError?)

The cancel() method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.

Link copied to clipboard
fun cancelAsync(reason: JsError? = definedExternally): Promise<Void>

The cancel() method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.

Link copied to clipboard

The getReader() method of the ReadableStream interface creates a reader and locks the stream to it. While the stream is locked, no other reader can be acquired until this one is released.

Link copied to clipboard

The getStats() method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.

Link copied to clipboard

The getStats() method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.

Link copied to clipboard
fun <T : ERROR CLASS: Symbol not found for JsAny??> pipeThrough(transform: ReadableWritablePair<T, Uint8Array<*>>, options: StreamPipeOptions = definedExternally): ReadableStream<T>

The pipeThrough() method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.

Link copied to clipboard
suspend fun <R : ERROR CLASS: Symbol not found for JsAny??> ReadableStream<R>.pipeTo(destination: WritableStream<R>)
suspend fun <R : ERROR CLASS: Symbol not found for JsAny??> ReadableStream<R>.pipeTo(destination: WritableStream<R>, options: StreamPipeOptions)

The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

Link copied to clipboard
fun pipeToAsync(destination: WritableStream<Uint8Array<*>>, options: StreamPipeOptions = definedExternally): Promise<Void>

The pipeTo() method of the ReadableStream interface pipes the current ReadableStream to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.

Link copied to clipboard

The tee() method of the ReadableStream interface tees the current readable stream, returning a two-element array containing the two resulting branches as new ReadableStream instances.

Link copied to clipboard
fun values(options: ReadableStreamIteratorOptions = definedExternally): AsyncIterator<Uint8Array<*>>