QuestDB JavaScript Client - v5.0.0
    Preparing search index...

    Interface QwpNodeWebSocketOptions

    interface QwpNodeWebSocketOptions {
        agent?: Agent;
        authorization?: string;
        authTimeoutMs?: number;
        clientId?: string;
        closeTimeoutMs?: number;
        connectTimeoutMs?: number;
        failoverUrls?: readonly (string | URL)[];
        headers?: Record<string, string>;
        maxVersion?: number;
        protocols?: string | string[];
        requestDurableAck?: boolean;
        sendTimeoutMs?: number;
        url: string | URL;
        webSocketFactory?: (
            url: string | URL,
            options: {
                agent?: Agent;
                headers: Record<string, string>;
                onConnected: () => void;
                onUpgrade: (headers: IncomingHttpHeaders) => void;
                onUpgradeRejected: (rejection: QwpNodeUpgradeRejection) => void;
                protocols?: string | string[];
            },
        ) => QwpWebSocketLike;
    }

    Hierarchy (View Summary)

    Index

    Properties

    agent?: Agent

    Optional HTTP(S) agent used for the WebSocket upgrade.

    authorization?: string
    authTimeoutMs?: number

    Time allowed after TCP/TLS connection for HTTP authentication and the WebSocket upgrade.

    Defaults to QwpWebSocketConnectOptions.connectTimeoutMs when that is set, and to 15s otherwise, so narrowing only the connect deadline bounds the whole opening rather than being exceeded by a default nobody chose. Set this to give the slower phase its own budget. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    clientId?: string
    closeTimeoutMs?: number

    Maximum time allowed for a graceful WebSocket close. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    connectTimeoutMs?: number

    Node TCP/TLS connection deadline, or the complete opening deadline in a browser. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    failoverUrls?: readonly (string | URL)[]

    Additional endpoints attempted in order when the preferred endpoint fails.

    headers?: Record<string, string>
    maxVersion?: number
    protocols?: string | string[]
    requestDurableAck?: boolean

    Ingress-only. Durable ACK is negotiated on /write/v4; egress ignores it and egressTransportOptions() strips it, because sending the header on /read/v1 makes every query session fail the capability check.

    sendTimeoutMs?: number

    Maximum time a send may remain queued by the WebSocket. Defaults to 15s. Capped at 2,147,483,647ms (the host timer ceiling); a larger value throws a RangeError.

    url: string | URL
    webSocketFactory?: (
        url: string | URL,
        options: {
            agent?: Agent;
            headers: Record<string, string>;
            onConnected: () => void;
            onUpgrade: (headers: IncomingHttpHeaders) => void;
            onUpgradeRejected: (rejection: QwpNodeUpgradeRejection) => void;
            protocols?: string | string[];
        },
    ) => QwpWebSocketLike

    Test hook; defaults to the Node-only ws implementation.