DatagramTransport

Datagrams in, datagrams out: UDP, multicast, non-IP links, and DTLS through DatagramSecurity. Used by the RFC 7252 messaging layer (CON/NON/ACK/RST, deduplication, retransmission).

Byte arrays passed in either direction belong to the receiver afterwards; callers must not reuse them.

Properties

Link copied to clipboard
abstract val maxDatagramSize: Int

Largest datagram send accepts. Channel security lowers it by the record overhead, and the messaging layer derives the maximum message size and block size from it, never from a constant.

Functions

Link copied to clipboard
abstract suspend fun close()
Link copied to clipboard
abstract suspend fun receive(): DatagramEvent
Link copied to clipboard
abstract suspend fun send(to: Endpoint, datagram: ByteArray)