couch-kit
    Preparing search index...

    Function resolveWebSocketUrl

    • Resolve the WebSocket URL to connect to.

      If config.url is provided it is returned as-is. Otherwise the URL is derived from the current page location using the convention WS port = HTTP port + DEFAULT_WS_PORT_OFFSET (HTTP 8080 -> WS 8082; port+1 is skipped to avoid Metro's 8081). Returns null when no URL can be determined (no explicit URL and no location available).

      Parameters

      Returns string | null