Skip to content

basalt / realtime-client/src / Transport

Interface: Transport ​

Defined in: realtime-client/src/transport.ts:23

A connection mechanism (WebSocket or SSE) the client sits on top of.

Methods ​

close() ​

> close(): void

Defined in: realtime-client/src/transport.ts:26

Returns ​

void


connect() ​

> connect(handlers): void

Defined in: realtime-client/src/transport.ts:24

Parameters ​

handlers ​

TransportHandlers

Returns ​

void


send() ​

> send(command): void

Defined in: realtime-client/src/transport.ts:25

Parameters ​

command ​

ClientCommand

Returns ​

void


track()? ​

> optional track(event): void

Defined in: realtime-client/src/transport.ts:28

SSE needs the event names to listen for; WebSocket ignores this.

Parameters ​

event ​

string

Returns ​

void

Released under the MIT License.