/** * @license * Copyright Borda All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://borda.dev/license */ export interface WebSocketFactory { onConnect: (ws: WebSocket) => void; onOpen: (ws: WebSocket, ev: Event) => void; onError: (ws: WebSocket, err: Event) => void; onClose: (ws: WebSocket, ev: CloseEvent) => void; onMessage: (ws: WebSocket, message: MessageEvent) => void; } export declare function webSocketServer({ socketURL, serverKey, token, secret, }: { socketURL: string; serverKey: string; token: string | null; secret?: string; }): (factory: WebSocketFactory) => void; export declare function getWebSocketURL({ serverURL }: { serverURL: string; }): string;