class MQTT::SN::Packet::Subscribe
Constants
- DEFAULTS
Attributes
id[RW]
topic_id[RW]
topic_name[RW]
Public Instance Methods
encode_body()
click to toggle source
# File lib/qubitro-mqtt/sn/packet.rb, line 506 def encode_body raise 'id must be an Integer' unless id.is_a?(Integer) [encode_flags, id, encode_topic].pack('Cna*') end
parse_body(buffer)
click to toggle source
# File lib/qubitro-mqtt/sn/packet.rb, line 512 def parse_body(buffer) flags, self.id, topic = buffer.unpack('Cna*') parse_flags(flags) parse_topic(topic) end