njh / ruby-mqtt

Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
http://www.rubydoc.info/gems/mqtt
MIT License
541 stars 135 forks source link

Don't delete bytes from the input buffer when parsing? #41

Open njh opened 10 years ago

njh commented 10 years ago
  binary = "1!\x00\x13ti/iot/device/40550\x8D\xF8\t@\xC4\xE7O\xF0\xFF0\xE0\xE7"
  p binary.length
  packet = MQTT::Packet.parse(binary)
  p binary.length