Skip to content

Interface: WebSocketLike ​

Properties ​

PropertyModifierType
binaryType?publicstring
onclosepublic| ((event: WebSocketCloseEvent) => void) | null
onerrorpublic((event: unknown) => void) | null
onmessagepublic| ((event: WebSocketMessageEvent) => void) | null
onopenpublic(() => void) | null
readyStatereadonlynumber

Methods ​

close() ​

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

Parameters ​

ParameterType
code?number
reason?string

Returns ​

void


send() ​

ts
send(data: string): void;

Parameters ​

ParameterType
datastring

Returns ​

void


terminate()? ​

ts
terminate?(): void;

Node.js extension used when a failed connection cannot close gracefully.

Returns ​

void

Built by Siebly. Open source SDKs for exchange APIs.