Class: PahoMqtt::Packet::Pingresp
- Inherits:
-
PahoMqtt::Packet
- Object
- PahoMqtt::Packet
- PahoMqtt::Packet::Pingresp
- Defined in:
- lib/paho.mqtt/packet_manager.rb
Overview
Class representing an MQTT Ping Response packet
Constant Summary
Constants inherited from PahoMqtt::Packet
Instance Attribute Summary
Attributes inherited from PahoMqtt::Packet
#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 PahoMqtt::Packet
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
1005 1006 1007 |
# File 'lib/paho.mqtt/packet_manager.rb', line 1005 def initialize(args={}) super(args) end |
Instance Method Details
#parse_body(buffer) ⇒ Object
Check the body
1010 1011 1012 1013 1014 1015 |
# File 'lib/paho.mqtt/packet_manager.rb', line 1010 def parse_body(buffer) super(buffer) unless buffer.empty? raise "Extra bytes at end of Ping Response packet" end end |