/**
 * @license
 * Copyright 2022-2026 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { DnsMessage, DnsMessageType } from "#codec/DnsCodec.js";
import { Network } from "#net/Network.js";
import { UdpMulticastServer } from "#net/udp/UdpMulticastServer.js";
import { Lifetime } from "#util/Lifetime.js";
import { AsyncObservable } from "#util/Observable.js";
/**
 * Manages the UDP socket for other components that implement MDNS logic.
 */
export declare class MdnsSocket {
    #private;
    static create(network: Network, options?: {
        enableIpv4?: boolean;
        netInterface?: string;
        lifetime?: Lifetime.Owner;
    }): Promise<MdnsSocket>;
    constructor(socket: UdpMulticastServer);
    get network(): Network;
    get supportsIpv4(): boolean;
    get netInterface(): string | undefined;
    get receipt(): AsyncObservable<[message: MdnsSocket.Message], void>;
    /**
     * Declare the DNS names an owner cares about so irrelevant packets are dropped before the expensive full decode.
     * See {@link MdnsRelevanceFilter}; pass `"all"` when interest cannot be enumerated. For interest that changes one
     * name at a time, prefer {@link addRelevantName} / {@link removeRelevantName}.
     */
    registerRelevantNames(owner: string, names: Iterable<string> | "all"): void;
    addRelevantName(owner: string, name: string): void;
    removeRelevantName(owner: string, name: string): void;
    unregisterRelevantNames(owner: string): void;
    send(message: Partial<DnsMessage> & {
        messageType: DnsMessageType;
    }, intf?: string, unicastDest?: string): Promise<void>;
    close(): Promise<void>;
}
export declare namespace MdnsSocket {
    interface Message extends DnsMessage {
        sourceIp: string;
        sourceIntf: string;
    }
    const BROADCAST_IPV4 = "224.0.0.251";
    const BROADCAST_IPV6 = "ff02::fb";
    const BROADCAST_PORT = 5353;
}
//# sourceMappingURL=MdnsSocket.d.ts.map