RelayTransport
Defined in: seyd/sdks/js/core/src/transport.ts:68
The cloud relay as a Transport. One WebSocket to the signal server’s
/relay; the first message attaches to the session with the token from the
offer, and the robot is only dialled by the cloud once we have. Binary
frames are [kind, ...payload]; nothing else crosses.
Implements
Section titled “Implements”Properties
Section titled “Properties”closed
Section titled “closed”
readonlyclosed:Promise<string>
Defined in: seyd/sdks/js/core/src/transport.ts:72
Resolves with a reason once the transport is gone, however it went.
Implementation of
Section titled “Implementation of”datagrams
Section titled “datagrams”
readonlydatagrams:ReadableStream<Uint8Array<ArrayBufferLike>>
Defined in: seyd/sdks/js/core/src/transport.ts:71
Implementation of
Section titled “Implementation of”
readonlykind:"relay"
Defined in: seyd/sdks/js/core/src/transport.ts:69
Implementation of
Section titled “Implementation of”
readonlylabel:"relay"='relay'
Defined in: seyd/sdks/js/core/src/transport.ts:70
Path label reported in stats: the winning candidate’s, or ‘relay’.
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: seyd/sdks/js/core/src/transport.ts:161
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”openControl()
Section titled “openControl()”openControl():
Promise<ControlPipe>
Defined in: seyd/sdks/js/core/src/transport.ts:139
The control stream. Opened once; the pilot speaks first on it.
Returns
Section titled “Returns”Promise<ControlPipe>
Implementation of
Section titled “Implementation of”sendDatagram()
Section titled “sendDatagram()”sendDatagram(
u8):void
Defined in: seyd/sdks/js/core/src/transport.ts:134
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”connect()
Section titled “connect()”
staticconnect(url,sessionId,token,__namedParameters?):Promise<RelayTransport>
Defined in: seyd/sdks/js/core/src/transport.ts:93
Dial and attach. Resolves once the cloud reports the robot attached too,
so a hello sent right after is delivered; rejects with RelayError if
the relay refuses, the robot never shows up, or timeoutMs passes.
Parameters
Section titled “Parameters”string
sessionId
Section titled “sessionId”string
string
__namedParameters?
Section titled “__namedParameters?”timeoutMs?
Section titled “timeoutMs?”number = 15000
Returns
Section titled “Returns”Promise<RelayTransport>