import { EventEmitter } from '../node-singletons/index.js';
export type CloudflareSocketOptions = {
    tls?: boolean;
    timeoutMs?: number;
};
export type CloudflareSocketInstance = EventEmitter & {
    write: (data: Buffer | Uint8Array) => boolean;
    end: () => void;
    destroy: () => void;
    connect: (..._args: unknown[]) => CloudflareSocketInstance;
    startTls: () => Promise<void>;
    pause: () => void;
    resume: () => void;
    setTimeout: (timeoutMs: number, callback?: () => void) => void;
    setNoDelay: (_noDelay?: boolean) => void;
    setKeepAlive: (_enable?: boolean, _initialDelay?: number) => void;
    ref: () => void;
    unref: () => void;
};
export type CloudflareSocketFactory = {
    create: (hostname: string, port: number, options?: CloudflareSocketOptions) => CloudflareSocketInstance;
};
export declare const CloudflareSocket: CloudflareSocketFactory;
//# sourceMappingURL=CloudflareSocket.d.ts.map