Package-level declarations

Types

Link copied to clipboard
class CoapFormatException(message: String, val messageId: Int? = null, val type: CoapMessageType? = null, val silentlyIgnore: Boolean = false) : Exception

A message that could not be parsed (RFC 7252 §4.2 calls this a message format error).

Link copied to clipboard
interface MessageCodec

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.

Link copied to clipboard

The option and payload part shared by every CoAP framing (RFC 7252 §3.1, RFC 8323 §3.2): delta-encoded options, then an optional 0xFF marker followed by a non-empty payload.

Link copied to clipboard

The CoAP message format for reliable transports (RFC 8323 §3.2 and §4.2). There is no version, type or Message ID; a length field (Len) gives the size of options and payload:

Link copied to clipboard
class ReliableStreamDecoder(val maxMessageSize: Long = DEFAULT_MAX_MESSAGE_SIZE)

Splits a TCP or TLS byte stream into messages (RFC 8323 §3.2). Feed it whatever bytes arrive; it returns every message completed so far and keeps the rest.

Link copied to clipboard

The CoAP over UDP message format (RFC 7252 §3):