Constructors

Accessors

Methods

  • Create a WebSocket connection

    Parameters

    • url: string

      The URL to connect to

    • Optionaloptions: { protocols?: string | string[] }

      The options for the WebSocket connection

    Returns Promise<WebSocketConnection>

    The WebSocket connection

  • Create a WebTransport connection

    Parameters

    • url: string

      The URL to connect to

    • Optionaloptions: { allowPooling?: boolean }

      The options for the WebTransport connection

    Returns Promise<WebTransportConnection>

    The WebTransport connection

  • Get a socket connection

    Parameters

    • id: string

      The ID of the connection to get

    Returns undefined | SocketConnection

    The socket connection