Script API - v1.26.30.27
    Preparing search index...

    Used to manage WebSocket connections.

    export class WebSocket {
    private constructor();
    connect(uri: string, headers?: HttpHeader[]): Promise<WebSocketClient>;
    }
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • uri: string

        URL to make connection to.

      • Optionalheaders: HttpHeader[]

      Returns Promise<WebSocketClient>

      An awaitable promise that contains the WebSocket client that was connected.

      Attempts to connect a WebSocket client.

      This function can't be called in restricted-execution mode.

      This function can't be called in early-execution mode.