Sha256: ab78a9ac1b28b5a8523d0d50b07be54f49f4cdf5c3d009281ed0c9ea5e8f5052

Contents?: true

Size: 260 Bytes

Versions: 1

Compression:

Stored size: 260 Bytes

Contents

#!/usr/bin/env ruby

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

require 'mqtt/client'

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.4 examples/simple_get.rb