Skip to main content

overwolf.web.WebSocket

Overwolf APIs / overwolf / overwolf / web / WebSocket

Properties​

PropertyTypeDescription
onClosedEvent<ClosedEvent>Fired when connection closed.
onErrorEvent<ErrorEvent>Fired on error.
onMessageEvent<MessageEvent>Fired when the websocket receives an incoming message.
onOpenEvent<&#123; &#125;>Fired on websocket connection Opened.

Methods​

close()​

close(): void;

Closes the websocket. It can be re-opened again.

Returns​

void


connect()​

connect(callback: CallbackFunction<Result>): void;

Listens for requests on the given port.

Parameters​

ParameterTypeDescription
callbackCallbackFunction<Result>-

Returns​

void


send()​

send(message: string, callback: CallbackFunction<Result>): void;

Send message.

Parameters​

ParameterTypeDescription
messagestring-
callbackCallbackFunction<Result>-

Returns​

void