Class: MiniMqtt::SubackPacket
- Defined in:
- lib/mini_mqtt/suback_packet.rb
Instance Attribute Summary collapse
-
#max_qos_accepted ⇒ Object
Returns the value of attribute max_qos_accepted.
-
#packet_id ⇒ Object
Returns the value of attribute packet_id.
Instance Method Summary collapse
Methods inherited from Packet
#decode, #encode, #flags, get_packet_class, packet_type_id
Methods included from BinHelper
#flag_byte, #mqtt_utf8_encode, #read_mqtt_encoded_string, #read_ushort, #uchar, #ushort
Instance Attribute Details
#max_qos_accepted ⇒ Object
Returns the value of attribute max_qos_accepted.
3 4 5 |
# File 'lib/mini_mqtt/suback_packet.rb', line 3 def max_qos_accepted @max_qos_accepted end |
#packet_id ⇒ Object
Returns the value of attribute packet_id.
3 4 5 |
# File 'lib/mini_mqtt/suback_packet.rb', line 3 def packet_id @packet_id end |
Instance Method Details
#read_payload ⇒ Object
10 11 12 |
# File 'lib/mini_mqtt/suback_packet.rb', line 10 def read_payload @max_qos_accepted = @stream.read.unpack 'C*' end |
#read_variable_header ⇒ Object
6 7 8 |
# File 'lib/mini_mqtt/suback_packet.rb', line 6 def read_variable_header @packet_id = read_ushort @stream end |