class MQTT::MQTT::MQTT::Packet::Pubcomp

Class representing an MQTT Publish Complete packet

Public Instance Methods

encode_body() click to toggle source

Get serialisation of packet's body

# File lib/mqttbridge/packet.rb, line 750
def encode_body
  encode_short(@id)
end
inspect() click to toggle source

Returns a human readable string, summarising the properties of the packet

# File lib/mqttbridge/packet.rb, line 764
def inspect
  "\#<#{self.class}: 0x%2.2X>" % id
end
parse_body(buffer) click to toggle source

Parse the body (variable header and payload) of a packet

Calls superclass method
# File lib/mqttbridge/packet.rb, line 755
def parse_body(buffer)
  super(buffer)
  @id = shift_short(buffer)
  unless buffer.empty?
    raise ProtocolException.new("Extra bytes at end of Publish Complete packet")
  end
end