API reference
interfaces
Synctransport

Interface: SyncTransport

Properties

connectionStatus

connectionStatus: undefined | ConnectionStatus

Defined in

packages/client/src/transport/transport.ts:15 (opens in a new tab)


isOpen

isOpen: boolean

Defined in

packages/client/src/transport/transport.ts:14 (opens in a new tab)

Methods

close

close(code?, reason?): void

Parameters

NameType
code?number
reason?string

Returns

void

Defined in

packages/client/src/transport/transport.ts:24 (opens in a new tab)


connect

connect(params): void

Parameters

NameType
paramsTransportConnectParams

Returns

void

Defined in

packages/client/src/transport/transport.ts:23 (opens in a new tab)


onClose

onClose(callback): void

Parameters

NameType
callback(ev: any) => void

Returns

void

Defined in

packages/client/src/transport/transport.ts:25 (opens in a new tab)


onConnectionChange

onConnectionChange(callback): void

Parameters

NameType
callback(state: ConnectionStatus) => void

Returns

void

Defined in

packages/client/src/transport/transport.ts:26 (opens in a new tab)


onError

onError(callback): void

Parameters

NameType
callback(ev: any) => void

Returns

void

Defined in

packages/client/src/transport/transport.ts:22 (opens in a new tab)


onMessage

onMessage(callback): void

Parameters

NameType
callback(message: any) => void

Returns

void

Defined in

packages/client/src/transport/transport.ts:21 (opens in a new tab)


onOpen

onOpen(callback): void

Parameters

NameType
callback(ev: any) => void

Returns

void

Defined in

packages/client/src/transport/transport.ts:16 (opens in a new tab)


sendMessage

sendMessage<Msg>(type, payload): void

Type parameters

NameType
Msgextends ClientSyncMessage

Parameters

NameType
typeMsg["type"]
payloadMsg["payload"]

Returns

void

Defined in

packages/client/src/transport/transport.ts:17 (opens in a new tab)