FallbackTransport
Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:72
A transport that dials WebTransport and, unless that is ready within the WebSocket delay, QMux over WebSocket
alongside it: the first ready carries the session and the other is closed. Before ready it stands in for the dials
in progress; after, it is the winner’s.
Implements
Section titled “Implements”Properties
Section titled “Properties”closed
Section titled “closed”readonly closed: Promise<CloseInfo>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:76
The winner’s closed; rejects with the dial’s failure when neither dial came up (TA-9).
Implementation of
Section titled “Implementation of”MoqtTransport.closed
incomingBidirectionalStreams
Section titled “incomingBidirectionalStreams”readonly incomingBidirectionalStreams: ReadableStream<BidirectionalStreamLike>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:80
The winner’s incoming bidirectional streams.
Implementation of
Section titled “Implementation of”MoqtTransport.incomingBidirectionalStreams
incomingUnidirectionalStreams
Section titled “incomingUnidirectionalStreams”readonly incomingUnidirectionalStreams: ReadableStream<ReadableStream<Uint8Array<ArrayBufferLike>>>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:78
The winner’s incoming unidirectional streams.
Implementation of
Section titled “Implementation of”MoqtTransport.incomingUnidirectionalStreams
readonly ready: Promise<void>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:74
Resolves once one of the dials is ready; rejects with the WebSocket dial’s failure, or when closed first.
Accessors
Section titled “Accessors”carrier
Section titled “carrier”Get Signature
Section titled “Get Signature”get carrier(): | FallbackCarrier | undefined;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:103
The transport the session runs on; undefined until ready.
Returns
Section titled “Returns”| FallbackCarrier
| undefined
protocol
Section titled “protocol”Get Signature
Section titled “Get Signature”get protocol(): string;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:108
The protocol the winner’s peer selected (TA-8); empty until ready resolves.
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”MoqtTransport.protocol
Methods
Section titled “Methods”close()
Section titled “close()”close(info?): void;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:121
Close the winner (TA-10); before ready, cancel every dial in progress (TA-11).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info? |
{ closeCode?: number; reason?: string; } |
info.closeCode? |
number |
info.reason? |
string |
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”MoqtTransport.close
createBidirectionalStream()
Section titled “createBidirectionalStream()”createBidirectionalStream(): Promise<BidirectionalStreamLike>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:116
Open a bidirectional stream to the peer.
Returns
Section titled “Returns”Promise<BidirectionalStreamLike>
Implementation of
Section titled “Implementation of”MoqtTransport.createBidirectionalStream
createUnidirectionalStream()
Section titled “createUnidirectionalStream()”createUnidirectionalStream(options?): Promise<WritableStream<Uint8Array<ArrayBufferLike>>>;Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:112
Open a unidirectional stream to the peer, scheduled by options.sendOrder where the transport supports it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options? |
MoqtSendStreamOptions |
Returns
Section titled “Returns”Promise<WritableStream<Uint8Array<ArrayBufferLike>>>
Implementation of
Section titled “Implementation of”MoqtTransport.createUnidirectionalStream