class

MQTT::V5::Unsubscribe

Inherits MQTT::Header / BinData / Reference / Object

Constants

AFTER_DESERIALIZE = [] of Nil
ALLOWED_PROPERTIES = [PropertyId::UserProperty]

MQTT-3.10.2.1, only user properties are allowed here

BEFORE_SERIALIZE = [] of Nil
ENDIAN = ["big"]
KLASS_NAME = [MQTT::V5::Unsubscribe]
PARTS = [{type: "basic", name: message_id, cls: UInt16, onlyif: nil, verify: nil, value: nil, endian: nil}, {type: "basic", name: properties, cls: MQTT::V5::Properties, onlyif: nil, verify: nil, value: nil}, {type: "variable_array", name: topics, cls: MQTT::V5::UnsubTopic, container: Array(MQTT::V5::UnsubTopic), onlyif: nil, verify: nil, read_next: -> do consumed < packet_length end, value: nil}] of Nil
REMAINING = [] of Nil

Class methods

bit_fields
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
message_id
message_id=(message_id : UInt16)
properties
properties=(properties : Properties)
topics
Source
topics=(topics : Array(MQTT::V5::UnsubTopic))
topics=(array : Enumerable(String))
Source
validate!
Source