@tikoci/centrs
    Preparing search index...

    Interface ListenMndpOptions

    interface ListenMndpOptions {
        cache?: MndpCache;
        host?: string;
        now?: () => number;
        onBound?: (port: number) => void;
        port?: number;
        refreshIntervalMs?: number;
        reuseAddr?: boolean;
        reusePort?: boolean;
        sendRefresh?: boolean;
        signal?: AbortSignal;
        timeoutMs?: number;
        ttlMs?: number;
    }
    Index

    Properties

    cache?: MndpCache

    Cache to populate; a new one is created when omitted.

    host?: string

    Bind address. Default 0.0.0.0; tests use 127.0.0.1.

    now?: () => number

    Clock injection forwarded to a freshly created MndpCache.

    onBound?: (port: number) => void

    Called once with the actually-bound port (useful with port: 0).

    port?: number

    UDP port to bind. Default 5678; pass 0 for an ephemeral test port.

    refreshIntervalMs?: number

    Refresh cadence in ms; 0 sends a single refresh. Default 5000.

    reuseAddr?: boolean

    Enable SO_REUSEADDR. Default true.

    reusePort?: boolean

    Enable SO_REUSEPORT for coexistence with other MNDP listeners. Default true except on Windows.

    sendRefresh?: boolean

    Send the broadcast refresh that prompts replies. Default true.

    signal?: AbortSignal

    Abort the listen early; resolves with whatever was collected so far.

    timeoutMs?: number

    Listen window in ms before the listener resolves. Default 15000.

    ttlMs?: number

    Cache TTL in ms, forwarded to a freshly created MndpCache.