Skip to content

createConnection beta ​

Function of @v12-engine/client

ts
export declare function createConnection(client: ConnectionHost, reconnect: Reconnect | undefined, options?: {
    waits?: readonly number[];
    wait?: (seconds: number) => Promise<void>;
}): ConnectionController;

Makes the connection controller of a client: it tries a dropped connection again with growing waits (options.waits, RETRY_WAITS by default) through reconnect, and gives the controller