MDNSServiceDiscoverer

Discovers peers on the local network via mDNS / Bonjour using NSNetServiceBrowser on iOS.

Browse-only: hosting remains JVM-only via MDNSServiceAdvertiser / JmDNS.

The browser is scheduled on NSRunLoop.mainRunLoop so callbacks fire regardless of which dispatcher collects the flow.

Parameters

serviceType

The mDNS service type. Supply the canonical base form (e.g. MDNSServiceType("_myapp._tcp")) — NSNetServiceBrowser receives the type without the local. domain (which is passed separately to NSNetServiceBrowser.searchForServicesOfType).

Constructors

Link copied to clipboard
constructor(serviceType: MDNSServiceType)

Properties

Link copied to clipboard
open override val kind: DiscoveryKind

Functions

Link copied to clipboard
open fun departures(): Flow<String>
Link copied to clipboard
open override fun discoveries(): Flow<MDNSAdvertisement>