import { Effect, type Getter, Signal } from "@moq/signals"; import type * as Path from "../path"; import { type ConnectProps, type WebSocketOptions, type WebTransportProps } from "./connect"; import type { Established } from "./established"; /** Exponential backoff settings for {@link Reload}'s reconnect loop. */ export type ReloadDelay = { initial: DOMHighResTimeStamp; multiplier: number; max: DOMHighResTimeStamp; timeout?: DOMHighResTimeStamp; }; /** Options for {@link Reload}: connect options plus reactive URL/enabled signals and backoff tuning. */ export type ReloadProps = ConnectProps & { enabled?: boolean | Signal; url?: URL | Signal; delay?: ReloadDelay; }; /** Current state of a {@link Reload} connection. */ export type ReloadStatus = "connecting" | "connected" | "disconnected"; /** Maintains a MoQ connection, reconnecting with exponential backoff when it drops. */ export declare class Reload { #private; /** Relay URL to connect to; updating it triggers a reconnect. */ url: Signal; /** Whether reconnecting is active. */ enabled: Signal; /** Current connection status. */ status: Signal; /** The currently established session, or undefined while disconnected. */ established: Signal; /** The set of broadcast paths currently announced by the server, updated reactively. */ readonly announced: Getter>; /** WebTransport options applied to each connection attempt (not reactive). */ webtransport?: WebTransportProps; /** WebSocket fallback options applied to each connection attempt (not reactive). */ websocket: WebSocketOptions | undefined; /** Backoff settings for the reconnect loop. */ delay: ReloadDelay; /** The reactive effect scope driving the connect loop; closed by {@link Reload.close}. */ signals: Effect; /** Resolves when the reconnect loop stops via {@link Reload.close} or the retry timeout. */ closed: Promise; constructor(props?: ReloadProps); /** Stop reconnecting, close the current connection, and resolve {@link Reload.closed}. */ close(): void; } //# sourceMappingURL=reload.d.ts.map