Skip to content

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.

readonly closed: Promise<string>

Defined in: seyd/sdks/js/core/src/transport.ts:72

Resolves with a reason once the transport is gone, however it went.

Transport.closed


readonly datagrams: ReadableStream<Uint8Array<ArrayBufferLike>>

Defined in: seyd/sdks/js/core/src/transport.ts:71

Transport.datagrams


readonly kind: "relay"

Defined in: seyd/sdks/js/core/src/transport.ts:69

Transport.kind


readonly label: "relay" = 'relay'

Defined in: seyd/sdks/js/core/src/transport.ts:70

Path label reported in stats: the winning candidate’s, or ‘relay’.

Transport.label

close(): void

Defined in: seyd/sdks/js/core/src/transport.ts:161

void

Transport.close


openControl(): Promise<ControlPipe>

Defined in: seyd/sdks/js/core/src/transport.ts:139

The control stream. Opened once; the pilot speaks first on it.

Promise<ControlPipe>

Transport.openControl


sendDatagram(u8): void

Defined in: seyd/sdks/js/core/src/transport.ts:134

Uint8Array

void

Transport.sendDatagram


static connect(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.

string

string

string

number = 15000

Promise<RelayTransport>