Class: MQTT::Packet::Pingresp
- Inherits:
-
MQTT::Packet
- Object
- MQTT::Packet
- MQTT::Packet::Pingresp
- Defined in:
- lib/mqtt/packet.rb
Overview
Class representing an MQTT Ping Response packet
Constant Summary
Constants inherited from MQTT::Packet
Instance Attribute Summary
Attributes inherited from MQTT::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 MQTT::Packet
create_from_header, #encode_body, #inspect, #message_id, #message_id=, parse, parse_header, read, read_byte, #to_s, #type_id, #type_name, #update_attributes, #validate_flags
Constructor Details
#initialize(args = {}) ⇒ Pingresp
Create a new Ping Response packet
987 988 989 |
# File 'lib/mqtt/packet.rb', line 987 def initialize(args = {}) super(args) end |
Instance Method Details
#parse_body(buffer) ⇒ Object
Check the body
992 993 994 995 996 997 |
# File 'lib/mqtt/packet.rb', line 992 def parse_body(buffer) super(buffer) return if buffer.empty? raise ProtocolException, 'Extra bytes at end of Ping Response packet' end |