/// import { FastFIFO } from "../fast_fifo.js"; import { MulticastInterface } from "../mdns/multicast_interface.js"; export type BrowseOpts = { /** The kind of service you wish to browse. */ service: { type: string; protocol: "tcp" | "udp"; subtypes?: string[]; }; multicastInterface: MulticastInterface; signal?: AbortSignal; }; /** A service discovered via multicast DNS-SD. */ export type Service = { name: string; type: string; subtypes: string[]; protocol: "tcp" | "udp"; host: string; port: number; txt: Record; /** Whether the service is active or not. Will be `false` when a service responder has indicated it is going offline. */ isActive: boolean; }; /** Searches for DNS-SD services on the local network. * * ``` * for await ( * const service of browse({ * multicastInterface: new MulticastInterface(), * service: { * protocol: "tcp", * type: "http", * }, * }) * ) { * if (service.isActive) { * console.log(`📡 ${service.name} - ${service.host}:${service.port}`); * } * } * ``` */ export declare function browse(opts: BrowseOpts): FastFIFO;