Package-level declarations

Types

Link copied to clipboard
class AndroidNetService(nativeService: NsdServiceInfo) : NetService, NsdManager.RegistrationListener
Link copied to clipboard
data class DiscoveredService(val name: String, val addresses: List<String>, val host: String, val type: String, val port: Int, val txt: Map<String, ByteArray?>)

A DNS_SD service that was discovered in the network.

Link copied to clipboard
sealed interface DiscoveryEvent
Link copied to clipboard
class IosNetService(nativeService: NSNetService) : NetService, NetServiceDelegate
Link copied to clipboard
class JvmNetService(nativeService: ServiceInfo, address: InetAddress? = getLocalAddresses().firstOrNull(), hostName: String? = null) : NetService
Link copied to clipboard
interface NetService

A DNS-SD service instance containing the platform specific implementation.

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

A combination of a services name and type to uniquely identify it

Functions

Link copied to clipboard
actual fun createNetService(type: String, name: String, port: Int, priority: Int, weight: Int, addresses: List<String>?, txt: Map<String, String>): NetService

Create a new DNS-SD to publish on the network. Make sure to call this on the main thread.

actual fun createNetService(type: String, name: String, port: Int, priority: Int, weight: Int, addresses: List<String>?, txt: Map<String, String>): NetService

Create a new DNS-SD to publish on the network. Make sure to call this on the main thread.

expect fun createNetService(type: String, name: String, port: Int = 0, priority: Int = 0, weight: Int = 1, addresses: List<String>? = null, txt: Map<String, String> = emptyMap()): NetService

Create a new DNS-SD to publish on the network. Make sure to call this on the main thread.

actual fun createNetService(type: String, name: String, port: Int, priority: Int, weight: Int, addresses: List<String>?, txt: Map<String, String>): NetService

Create a new DNS-SD to publish on the network. Make sure to call this on the main thread.

Link copied to clipboard
actual fun discoverServices(type: String): Flow<DiscoveryEvent>

Returns publish, unpublish and resolve events for the specified service type in the network.

actual fun discoverServices(type: String): Flow<DiscoveryEvent>

Returns publish, unpublish and resolve events for the specified service type in the network.

expect fun discoverServices(type: String): Flow<DiscoveryEvent>

Returns publish, unpublish and resolve events for the specified service type in the network.

actual fun discoverServices(type: String): Flow<DiscoveryEvent>

Returns publish, unpublish and resolve events for the specified service type in the network.

Link copied to clipboard
fun netService(type: String, name: String, configure: NetServiceConfig.() -> Unit = {}): NetService

Create a new DNS-SD to publish on the network. Make sure to call this on the main thread.

Link copied to clipboard
suspend fun publishService(type: String, name: String, timeoutInMs: Long = 10000, configure: NetServiceConfig.() -> Unit = {}): Nothing

Create a new DNS-SD to publish on the network. The service will stay published until the calling coroutine scope is cancelled.