OptionCodec
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.
Shared with kcoap-oscore, which encodes its plaintext and Class I options with the same rules (RFC 8613 §5.3); not for applications.
Functions
Link copied to clipboard
fun read(bytes: ByteArray, start: Int, end: Int, fail: (String) -> CoapFormatException): OptionCodec.Parsed
Reads options and payload from bytes[start, end); fail builds the exception to throw.