Sha256: ba02bd54dcb83d1787f37c6e8d0f10f2f6817193c84d889ad6445c46f893eb35

Contents?: true

Size: 981 Bytes

Versions: 3

Compression:

Stored size: 981 Bytes

Contents

#!/usr/bin/env ruby

require 'mqtt/client'

# Pure-ruby implementation of the MQTT protocol
module MQTT

  PACKET_TYPES = [
    nil,
    :connect,      # Client request to connect to Broker
    :connack,      # Connect Acknowledgment
    :publish,      # Publish message
    :puback,       # Publish Acknowledgment
    :pubrec,       # Publish Received (assured delivery part 1)
    :pubrel,       # Publish Release (assured delivery part 2)
    :pubcomp,      # Publish Complete (assured delivery part 3)
    :subscribe,    # Client Subscribe request
    :suback,       # Subscribe Acknowledgment
    :unsubscribe,  # Client Unsubscribe request
    :unsuback,     # Unsubscribe Acknowledgment
    :pingreq,      # PING Request
    :pingresp,     # PING Response
    :disconnect,   # Client is Disconnecting
    nil
  ]
  
  class Exception < Exception
  
  end

  class ProtocolException < MQTT::Exception
  
  end
  
  class NotConnectedException < MQTT::Exception
  
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mqtt-0.0.1 lib/mqtt.rb
mqtt-0.0.2 lib/mqtt.rb
mqtt-0.0.3 lib/mqtt.rb