Sha256: 986544e2314c850039ab9bd579753fece28f2c6115966441b33ccc7a847626b7

Contents?: true

Size: 268 Bytes

Versions: 1

Compression:

Stored size: 268 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('livetext/#')
  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/livetext.rb