KtorUdpTransport
A UDP DatagramTransport on ktor-network, for coap on the JVM (and Android) and Apple platforms.
Peers are reported as Endpoint.Udp with the address in dev.kcoap.transport.IpLiteral canonical form, never by host name, so responses match requests by endpoint equality. Datagrams from addresses that are not IP (none exist on UDP sockets) are dropped. maxDatagramSize is what the CoAP layer may send; RFC 7252 §4.6 recommends 1152 bytes when the path MTU is unknown, which the default follows. Received datagrams may be larger.
val transport = KtorUdpTransport.bind(port = 5683)Content copied to clipboard