Sha256: 7aaf55ee6c080fdef2de2ed0e75c92acaa92838b8d7572d854209e229ac92f9c
Contents?: true
Size: 462 Bytes
Versions: 5
Compression:
Stored size: 462 Bytes
Contents
# Usage: $ PUSHER_KEY=YOURKEY ruby examples/hello_pusher.rb require 'rubygems' require './lib/pusher-client.rb' require 'pp' APP_KEY = ENV['PUSHER_KEY'] # || "YOUR_APPLICATION_KEY" PusherClient.logger = Logger.new('/dev/null') socket = PusherClient::Socket.new(APP_KEY) socket.connect(true) # Subscribe to a channel socket.subscribe('hellopusher') # Bind to a channel event socket['hellopusher'].bind('hello') do |data| pp data end loop do sleep 1 end
Version data entries
5 entries across 5 versions & 2 rubygems