class

MQTT::V5::Reasoned

Inherits MQTT::V5::ReasonCoded / MQTT::Header / BinData / Reference / Object

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

Constants

AFTER_DESERIALIZE = [] of Nil

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

BEFORE_SERIALIZE = [] of Nil

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

ENDIAN = ["big"]

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

KLASS_NAME = [MQTT::V5::Reasoned]

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

PARTS = [{type: "basic", name: raw_reason_code, cls: UInt8, onlyif: -> do packet_length > 0 end, verify: nil, value: nil, endian: nil}, {type: "basic", name: properties, cls: MQTT::V5::Properties, onlyif: -> do packet_length > 1 end, verify: nil, value: nil}] of Nil

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

REMAINING = [] of Nil

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

Class methods

bit_fields

DISCONNECT and AUTH have the same shape, minus the packet identifier. A 5.0 broker may send DISCONNECT with a reason before closing, which 3.1.1 had no way to express

Source

Instance methods

__format__

A group or bit_field captures the endianness at its declaration point, so declaring endian after one would silently leave it system-endian. Fail loudly.

Source
add_user_property(key : String, value : String) : Nil
Source
calculate_length
Source
properties
properties=(properties : Properties)
raw_reason_code
raw_reason_code=(raw_reason_code : UInt8)
reason_string
Source
reason_string=(value : String | Nil)
Source
user_properties
Source