# File lib/mqtt/sn/packet.rb, line 530 def encode_body unless id.is_a?(Integer) raise "id must be an Integer" end [encode_flags, id, encode_topic].pack('Cna*') end
# File lib/mqtt/sn/packet.rb, line 538 def parse_body(buffer) flags, self.id, topic = buffer.unpack('Cna*') parse_flags(flags) parse_topic(topic) end