MQTT::V3::Connack
Inherits MQTT::Header / BinData / Reference / Object
Class representing an MQTT Connect Acknowledgment Packet
Constants
AFTER_DESERIALIZE = [] of Nil
Class representing an MQTT Connect Acknowledgment Packet
BEFORE_SERIALIZE = [] of Nil
Class representing an MQTT Connect Acknowledgment Packet
ENDIAN = ["big"]
Class representing an MQTT Connect Acknowledgment Packet
KLASS_NAME = [MQTT::V3::Connack]
Class representing an MQTT Connect Acknowledgment Packet
PARTS = [{type: "bitfield", name: 1, cls: MQTT::V3::Connack,
onlyif: nil, verify: nil, endian: IO::ByteFormat::BigEndian}, {type: "basic", name: return_code, cls: UInt8, onlyif: nil, verify: nil, value: nil, endian: nil}] of Nil
Class representing an MQTT Connect Acknowledgment Packet
REFUSAL_CODES = {1_u8 => "Connection refused: unacceptable protocol version", 2_u8 => "Connection refused: client identifier rejected", 3_u8 => "Connection refused: server unavailable", 4_u8 => "Connection refused: bad user name or password", 5_u8 => "Connection refused: not authorised"}
REMAINING = [] of Nil
Class representing an MQTT Connect Acknowledgment Packet
Class methods
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.
_reserved_
_reserved_=(_reserved_ : UInt8)
calculate_length
Sourcereturn_code
The return code (defaults to 0 for connection accepted)
return_code=(return_code : UInt8)
The return code (defaults to 0 for connection accepted)
session_present
Sourcesession_present=(session_present : UInt8)
session_present=(value : Bool)
Sourcesuccess!
Sourcesuccess?
Source