Skip to content

Interface: Transport ​

Properties ​

PropertyModifierType
statereadonlyTransportState

Methods ​

close() ​

ts
close(code?, reason?): void;

Parameters ​

ParameterType
code?number
reason?string

Returns ​

void


open() ​

ts
open(handlers): void;

Begins connecting. handlers.onOpen or handlers.onClose will follow.

Parameters ​

ParameterType
handlersTransportHandlers

Returns ​

void


send() ​

ts
send(bytes): void;

Never throws: a send on a dead socket is reported through onClose, which is the path a caller already has to handle.

Parameters ​

ParameterType
bytesUint8Array

Returns ​

void

Talkline documentation