WebSocket

The WebSocket module

functions

VoxEngine.allowWebSocketConnections

VoxEngine.allowWebSocketConnections(): void

Allows the incoming WebSocket connection.

Returns

  • Return:

    void

VoxEngine.createWebSocket

VoxEngine.createWebSocket(url: string, protocols: string): WebSocket

Create a new outgoing WebSocket connection.

Parameters

  • url:

    string

    URL to which to connect (wss:// + domain + path). Only wss is supported at the moment.

  • protocols:

    string
    OPTIONAL

    Sub-protocols selected by the server. The default value is 'chat'.

Returns