/**
 * Socket Tracker Utility
 * Provides standardized socket cleanup with proper listener and timer management
 */
import type { Socket } from 'node:net';
export type SocketTracked = {
    cleanup: () => void;
    addListener: <E extends string>(event: E, listener: (...args: any[]) => void) => void;
    addTimer: (t: NodeJS.Timeout | null | undefined) => void;
    safeDestroy: (reason?: Error) => void;
};
/**
 * Create a socket tracker to manage listeners and timers
 * Ensures proper cleanup and prevents memory leaks
 */
export declare function createSocketTracker(socket: Socket): SocketTracked;
