class MqttRails::Packet::Pingresp

Public Class Methods

new(args={}) click to toggle source

Create a new Ping Response packet

Calls superclass method MqttRails::Packet::Base::new
# File lib/mqtt_rails/packet/pingresp.rb, line 24
def initialize(args={})
  super(args)
end

Public Instance Methods

parse_body(buffer) click to toggle source

Check the body

Calls superclass method MqttRails::Packet::Base#parse_body
# File lib/mqtt_rails/packet/pingresp.rb, line 29
def parse_body(buffer)
  super(buffer)
  unless buffer.empty?
    raise MqttRails::PacketFormatException.new(
            "Extra bytes at end of Ping Response packet")
  end
end