Sha256: b6665408642b0efd6f524eb5b537866ab529feb66299fec59ee6f86480fc36db
Contents?: true
Size: 467 Bytes
Versions: 1
Compression:
Stored size: 467 Bytes
Contents
# Usage: $ EVENTFLIT_KEY=YOURKEY ruby examples/hello_eventflit_async.rb $:.unshift(File.expand_path("../../lib", __FILE__)) require 'eventflit-client' require 'pp' APP_KEY = ENV['EVENTFLIT_KEY'] # || "YOUR_APPLICATION_KEY" socket = EventflitClient::Socket.new(APP_KEY) socket.connect(true) # Subscribe to a channel socket.subscribe('helloeventflit') # Bind to a channel event socket['helloeventflit'].bind('hello') do |data| pp data end loop do sleep 1 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
eventflit-client-0.1.0 | examples/hello_eventflit_async.rb |