/**
 * WebSocket Server Implementation
 * Provides real-time updates for simulator data and events
 */
import { Server } from "socket.io";
import { Server as HTTPServer } from "http";
interface ClientInfo {
    id: string;
    connectedAt: Date;
    subscriptions: Set<string>;
}
interface BroadcastData {
    simulatorId?: string;
    templateId?: string;
    [key: string]: any;
}
declare class WebSocketServer {
    private io;
    private httpServer;
    private clients;
    private simulatorSubscriptions;
    private broadcastHook?;
    constructor(httpServer: HTTPServer);
    initialize(opts?: {
        broadcastHook?: (event: string, data: any) => void;
    }): void;
    /**
     * Get the underlying Socket.IO server instance
     */
    getIO(): Server | null;
    private setupEventHandlers;
    private subscribeToSimulator;
    private unsubscribeFromSimulator;
    private handleDisconnect;
    /**
     * Broadcast an event to all connected clients
     */
    broadcast(event: string, data: BroadcastData): void;
    /**
     * Send event to specific simulator subscribers
     */
    broadcastToSimulator(simulatorId: string, event: string, data: any): void;
    /**
     * Get statistics about connected clients
     */
    getStats(): {
        totalClients: number;
        totalSubscriptions: number;
        simulatorSubscriptions: Record<string, number>;
    };
    /**
     * Get list of connected clients
     */
    getClients(): ClientInfo[];
    /**
     * Check if server is initialized
     */
    isInitialized(): boolean;
    /**
     * Shutdown the WebSocket server
     */
    shutdown(): Promise<void>;
}
/**
 * Create WebSocket server instance
 */
export declare function createWebSocketServer(httpServer: HTTPServer, opts?: {
    reset?: boolean;
    broadcastHook?: (event: string, data: any) => void;
}): WebSocketServer;
/**
 * Get existing WebSocket server instance
 */
export declare function getWebSocketServer(): WebSocketServer | null;
/**
 * Export the class for type usage
 */
export { WebSocketServer };
export type { ClientInfo, BroadcastData };
//# sourceMappingURL=websocketServer.d.ts.map