Module: MiniMqtt::AckPacket
- Included in:
- PubackPacket, PubcompPacket, PubrecPacket, PubrelPacket, UnsubackPacket
- Defined in:
- lib/mini_mqtt/packet.rb
Instance Attribute Summary collapse
-
#packet_id ⇒ Object
Returns the value of attribute packet_id.
Instance Method Summary collapse
Instance Attribute Details
#packet_id ⇒ Object
Returns the value of attribute packet_id.
64 65 66 |
# File 'lib/mini_mqtt/packet.rb', line 64 def packet_id @packet_id end |
Instance Method Details
#build_variable_header ⇒ Object
74 75 76 |
# File 'lib/mini_mqtt/packet.rb', line 74 def build_variable_header ushort @packet_id end |
#initialize(params = {}) ⇒ Object
66 67 68 |
# File 'lib/mini_mqtt/packet.rb', line 66 def initialize params = {} @packet_id = params[:packet_id] end |
#read_variable_header ⇒ Object
70 71 72 |
# File 'lib/mini_mqtt/packet.rb', line 70 def read_variable_header @packet_id = read_ushort @stream end |