Message

sealed class Message

Inheritors

Types

Link copied to clipboard
sealed class Code

Per "RFC 7252 3. Message Format", Code is an:

Link copied to clipboard
sealed class Option
Link copied to clipboard
data class Tcp(val code: Message.Code, val token: Long, val options: List<Message.Option>, val payload: ByteArray) : Message
Link copied to clipboard
data class Udp(val type: Message.Udp.Type, val code: Message.Code, val id: Int, val token: Long, val options: List<Message.Option>, val payload: ByteArray) : Message

Properties

Link copied to clipboard
abstract val code: Message.Code
Link copied to clipboard
abstract val options: List<Message.Option>
Link copied to clipboard
abstract val payload: ByteArray
Link copied to clipboard
abstract val token: Long

Per RFC 7252 2.2. Request/Response Model:

Functions

Link copied to clipboard

Encodes Message receiver as a ByteArray.