MessageCodec

interface MessageCodec(source)

Turns messages into wire bytes and back, for transports that deliver whole messages: a UDP datagram (UdpMessageCodec) or a WebSocket frame (ReliableMessageCodec.WebSocket). Byte streams use ReliableStreamDecoder to find message boundaries first.

Inheritors

Functions

Link copied to clipboard
abstract fun decode(bytes: ByteArray): CoapMessage
Link copied to clipboard
abstract fun encode(message: CoapMessage): ByteArray