Sha256: 73206d2ac41b294fe38130b325a76ebad6eee955bc6af3ac2d100b6e710208fd

Contents?: true

Size: 253 Bytes

Versions: 1

Compression:

Stored size: 253 Bytes

Contents

#!/usr/bin/env ruby

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

require 'mqtt'

client = MQTT::Client.new('mqtt.example.com')
client.connect do
  client.subscribe('#')
  loop do
    topic,message = client.get
    puts "#{topic}: #{message}"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mqtt-0.0.3 examples/simple_get.rb