class MQTT::Packet::Unsuback
Class representing an MQTT
Unsubscribe
Acknowledgment packet
Public Class Methods
new(args = {})
click to toggle source
Create a new Unsubscribe
Acknowledgment packet
Calls superclass method
MQTT::Packet::new
# File lib/mqtt/packet.rb, line 946 def initialize(args = {}) super(args) end
Public Instance Methods
encode_body()
click to toggle source
Get serialisation of packet's body
# File lib/mqtt/packet.rb, line 951 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/mqtt/packet.rb, line 966 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
MQTT::Packet#parse_body
# File lib/mqtt/packet.rb, line 956 def parse_body(buffer) super(buffer) @id = shift_short(buffer) return if buffer.empty? raise ProtocolException, 'Extra bytes at end of Unsubscribe Acknowledgment packet' end