Class: PahoMqtt::Packet::Pingreq
- Inherits:
-
PahoMqtt::Packet
- Object
- PahoMqtt::Packet
- PahoMqtt::Packet::Pingreq
- Defined in:
- lib/paho.mqtt/packet_manager.rb
Overview
Class representing an MQTT Ping Request 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 = {}) ⇒ Pingreq
constructor
Create a new Ping Request 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 = {}) ⇒ Pingreq
Create a new Ping Request packet
989 990 991 |
# File 'lib/paho.mqtt/packet_manager.rb', line 989 def initialize(args={}) super(args) end |
Instance Method Details
#parse_body(buffer) ⇒ Object
Check the body
994 995 996 997 998 999 |
# File 'lib/paho.mqtt/packet_manager.rb', line 994 def parse_body(buffer) super(buffer) unless buffer.empty? raise "Extra bytes at end of Ping Request packet" end end |