Sha256: b17bb22f667ce3df8327f7f79ea9fbc42361a7bcc75983f4672cacc5b4752964
Contents?: true
Size: 391 Bytes
Versions: 1
Compression:
Stored size: 391 Bytes
Contents
require 'pusher-client' PusherClient.logger = Logger.new(STDOUT) options = {:secret => YOUR_APP_SECRET} socket = PusherClient::Socket.new(YOUR_APP_KEY, options) socket.connect(true) # Connect asynchronously # Subscribe to a channel socket.subscribe('channel') # Bind to a global event socket.bind('event') do |data| puts data end loop do sleep(1) # Keep your main thread running end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pusher-client-nc-0.2.1 | examples/subscribe_async.rb |