import { type Socket as DgramSocket } from "dgram"; export type DgramSocketFactory = () => DgramSocket; export declare function createBoundUdp4Socket(createSocket?: DgramSocketFactory): Promise; /** * Close a dgram socket and wait for the fd to actually be released. * * Never rejects and never hangs: `close()` throws ERR_SOCKET_DGRAM_NOT_RUNNING * on an already-closed socket, and a socket caught mid-teardown may never run * the close callback at all. Both must settle, because callers await this on * the TURN failure path — a hang there would leave `#turnAllocating` pending * forever and wedge every later caller awaiting that same promise, and would * also block `Peer.stop()`. */ export declare function closeDgramSocket(sock: DgramSocket | undefined, timeoutMs?: number): Promise;