Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
MqttCrystal::Packet::Publish
Inherits
MqttCrystal::Packet
/
Reference
/
Object
Constructors
new
(topic :
String
= "pub/test", payload :
String
= "test", retain :
Bool
= false, id :
UInt16
= 0_u16, qos :
UInt8
= 0_u8, flags :
Array
(
Bool
) = [false, false, false, false], body_length :
UInt64
= 0_u64)
Source
Instance methods
encode_body
Source
id
Source
id=
(id :
UInt16
)
Source
parse_body
(buffer :
Array
(
UInt8
))
Source
payload
Source
payload=
(payload :
String
)
Source
qos
Source
qos=
(qos :
UInt8
)
Source
topic
Source
topic=
(topic :
String
)
Source