Destroys the DNSSD instance, stopping all services and shutting down the server.
No further operations should be performed after destruction.
Discovers a single service matching the provided criteria, with a timeout.
Stops discovery after the first match or when the timeout is reached.
Optional
options: BrowserOptionsOptional browser options to filter services.
Maximum time in milliseconds to wait for a match.
A promise that resolves with the discovered service or null
if none found.
Creates a new mDNS browser for discovering services on the network.
Optional
options: BrowserOptionsOptional configuration for the browser.
A new Browser
instance.
Creates a new service instance without publishing it to the network.
Configuration options for the service.
A new Service
instance linked to this registry.
Publishes a service to the network using the given options.
Configuration options for the service.
A promise that resolves with the published service.
Creates and starts a browser for discovering services, with an optional handler for discovered services.
Optional
options: BrowserOptionsOptional configuration for the browser.
Optional
onServiceUp: (service: DiscoveredService) => voidOptional callback invoked when a service is discovered.
A started Browser
instance.
Unpublishes all services that were previously published.
Sends goodbye messages and clears internal state.
High-level API for Multicast DNS Service Discovery and Advertisement.
The
DNSSD
class provides convenient methods for:It wraps a lower-level
MDNSServer
and coordinates interactions with the serviceRegistry
and serviceBrowser
.Example