/** * Reconnect backoff for RealtimeStore's WebSocket. * * A server that sheds load closes many sockets at once (1013). Without jitter * every client comes back at the same instant; without growth on quick closes a * socket that is accepted and then immediately dropped retries at the floor * forever. So: a connection that stayed up for STABLE_CONNECTION_MS resets the * delay, a shorter one doubles it, and every scheduled wait is jittered. */ export declare const RECONNECT_BASE_DELAY_MS = 1000; export declare const RECONNECT_MAX_DELAY_MS = 30000; export declare const STABLE_CONNECTION_MS = 10000; /** Delay to use after a close, given how long the closed connection had been up (null: never connected). */ export declare function reconnectDelayAfterClose(currentDelayMs: number, connectedForMs: number | null, maxDelayMs?: number): number; /** The wait actually scheduled: the delay scaled by a random factor in [0.5, 1.5). */ export declare function jitteredReconnectDelayMs(delayMs: number, random?: () => number): number;