Sha256: dddcd49a3f815ec79819d686bb0b9a03c59dfe5448e30fe776864f84b2a22505

Contents?: true

Size: 277 Bytes

Versions: 1

Compression:

Stored size: 277 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift File.dirname(__FILE__)+'/../lib'

require 'mqtt'


client = MQTT::Client.new('mqtt.example.com')
client.connect('simple_get')

client.subscribe('$SYS/#')

loop do
  topic,message = client.get
  puts "#{topic}: #{message}"
end

client.disconnect

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mqtt-0.0.1 examples/simple_get.rb