class MQTT::SN::Packet::Pubcomp

Constants

DEFAULTS

Attributes

id[RW]

Public Instance Methods

encode_body() click to toggle source
# File lib/qubitro-mqtt/sn/packet.rb, line 449
def encode_body
  raise 'id must be an Integer' unless id.is_a?(Integer)
  
  [id].pack('n')
end
parse_body(buffer) click to toggle source
# File lib/qubitro-mqtt/sn/packet.rb, line 455
def parse_body(buffer)
  self.id, _ignore = buffer.unpack('n')
end