Package-level declarations

Types

Link copied to clipboard
sealed class Header
Link copied to clipboard
sealed class Message

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T : Message> ByteArray.decode(): T

Decodes ByteArray receiver to a Message.

fun ByteArray.decode(header: Header.Tcp, offset: Int = header.size): Message.Tcp

Assembles a Message.Tcp by decoding CoAP message content (Options + Payload) from the ByteArray receiver and combining with provided header.

fun ByteArray.decode(header: Header.Udp, offset: Int = header.size): Message.Udp

Assembles a Message.Udp by decoding CoAP message content (Options + Payload) from the ByteArray receiver and combining with provided header.

Link copied to clipboard

Decodes ByteArray receiver to a TCP Message.

Link copied to clipboard

Decodes only the CoAP TCP (RFC 8323) header of the ByteArray receiver.

Link copied to clipboard

Decodes ByteArray receiver to a Message.Udp.

Link copied to clipboard

Decodes only the CoAP UDP (RFC 7252) header of the ByteArray receiver.

Link copied to clipboard

Encodes Message receiver as a ByteArray.

Link copied to clipboard

Encodes only the header portion of Figure 7: Message Format: