Companion

Properties

Link copied to clipboard
const val DEFAULT_MAX_DATAGRAM_SIZE: Int = 1152

RFC 7252 §4.6: the message size to assume when nothing is known about the path.

Functions

Link copied to clipboard
suspend fun bind(host: String = "0.0.0.0", port: Int = 0, maxDatagramSize: Int = DEFAULT_MAX_DATAGRAM_SIZE, selector: SelectorManager? = null, loggerFactory: LoggerFactory = LoggerFactory.Global): KtorUdpTransport

Binds a UDP socket to host and port (0 picks a free port).