MAX_LENGTH

const val MAX_LENGTH: Int = 65804(source)

RFC 7252 §3.1 allows values up to 65804 bytes; kcoap accepts the full range.