Class: PahoMqtt::Packet::Pingresp
- Defined in:
- lib/paho_mqtt/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
7 8 9 |
# File 'lib/paho_mqtt/packet/pingresp.rb', line 7 def initialize(args={}) super(args) end |
Instance Method Details
#parse_body(buffer) ⇒ Object
Check the body
12 13 14 15 16 17 |
# File 'lib/paho_mqtt/packet/pingresp.rb', line 12 def parse_body(buffer) super(buffer) unless buffer.empty? raise "Extra bytes at end of Ping Response packet" end end |