Skip to content

Transport

Defined in: transport.ts:8

A bidirectional channel that carries values of type T.

Type Parameter
T
close(): void;

Defined in: transport.ts:14

Permanently close this endpoint. Further sends are an error.

void


onMessage(handler): () => void;

Defined in: transport.ts:12

Subscribe to inbound messages. Returns an unsubscribe function.

ParameterType
handler(message) => void

() => void


send(message): void;

Defined in: transport.ts:10

Push a message toward the peer(s) on the other side.

ParameterType
messageT

void