import { Socket } from 'net';
import { EventEmitter } from 'events';
import { MessageBuffer } from '../config/protocol';
import { TCPResponse } from '../types/protocol.types';
/**
 * Connection metadata
 */
interface ConnectionInfo {
    socket: Socket;
    buffer: MessageBuffer;
    connectedAt: number;
    lastActivity: number;
    requestCount: number;
}
/**
 * Connection Manager - Manages all active TCP connections
 */
export declare class ConnectionManager extends EventEmitter {
    private connections;
    private connectionCounter;
    constructor();
    /**
     * Add new connection
     */
    addConnection(socket: Socket): string | null;
    /**
     * Remove connection
     */
    removeConnection(connectionId: string): void;
    /**
     * Send response to client
     */
    sendResponse(connectionId: string, response: TCPResponse): boolean;
    /**
     * Get connection info
     */
    getConnection(connectionId: string): ConnectionInfo | undefined;
    /**
     * Get total active connections
     */
    get activeConnections(): number;
    /**
     * Get all connection IDs
     */
    getAllConnectionIds(): string[];
    /**
     * Close all connections gracefully
     */
    closeAll(): void;
    /**
     * Setup socket event handlers
     */
    private setupSocketHandlers;
    /**
     * Generate unique connection ID
     */
    private generateConnectionId;
    /**
     * Get connection statistics
     */
    getStats(): Record<string, any>;
}
export {};
