Class: MqttRails::Packet::Pingresp
- Defined in:
- lib/mqtt_rails/packet/pingresp.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
#body_length, #flags, #id, #version
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Pingresp
constructor
Create a new Ping Response packet.
-
#parse_body(buffer) ⇒ Object
Check the body.
Methods inherited from Base
create_from_header, #encode_body, #inspect, parse, parse_header, read, #to_s, #type_id, #type_name, #update_attributes, #validate_flags
Constructor Details
#initialize(args = {}) ⇒ Pingresp
Create a new Ping Response packet
24 25 26 |
# File 'lib/mqtt_rails/packet/pingresp.rb', line 24 def initialize(args={}) super(args) end |
Instance Method Details
#parse_body(buffer) ⇒ Object
Check the body
29 30 31 32 33 34 35 |
# 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 |