Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
crymq
master
Top Level Namespace
Connack
Connect
Control
Crymq
Disconnect
Mqtt
MqttError
Packet
Pingreq
Pingresp
Pkid
Puback
Pubcomp
Publish
Pubrec
Pubrel
QoS
Suback
Subscribe
Topic
TopicError
Unsuback
Unsubscribe
Built with Crystal 1.9.2
2023-10-07 21:07:10 UTC
struct
Connack
Connack
Control
Struct
Value
Object
Overview
Fixed header for CONNACK PACKET
7 3 0
+--------------------------+--------------------------+
| CONNACK (2) NIBBLE | RESERVED | 0
+--------------------------+--------------------------+
| Remaining Len = Len of Varable header(2) | 1
+-----------------------------------------------------+
Variable header ( LENGTH = 2 Bytes)
+--------------------------+--------------------------+
| Reserved bits 1-7 must be set to 0 (0b0000 0000x) | 2
| Bit 0 is 'session present' flag |
+-----------------------------------------------------+
+--------------------------+--------------------------+
| Connect Return Code | 3
+-----------------------------------------------------
Defined in:
crymq/mqtt.cr
Constructors
.new
(session_present : Bool, return_code : UInt8)
Instance Method Summary
#to_io
(io : IO, format : IO::ByteFormat =
IO
::
ByteFormat
::
SystemEndian
)
Instance methods inherited from struct
Control
write_mqtt_string(io : IO, s : String)
write_mqtt_string
,
write_remaining_length(io : IO, remaining_len)
write_remaining_length
Constructor methods inherited from struct
Control
new
new
Constructor Detail
def self.
new
(session_present : Bool, return_code : UInt8)
#
[
View source
]
Instance Method Detail
def
to_io
(io : IO, format : IO::ByteFormat =
IO
::
ByteFormat
::
SystemEndian
)
#
[
View source
]