Sha256: 69e08d11e7433bcdd8f4f1d91783bff1238ff6fcca6e60572e8cff535f26c456

Contents?: true

Size: 404 Bytes

Versions: 1

Compression:

Stored size: 404 Bytes

Contents

require 'rubygems'
require './lib/pusher-client.rb'
require 'pp'

YOUR_APPLICATION_KEY = '73c70db2f09b7f279382'

PusherClient.logger = Logger.new('/dev/null')
socket = PusherClient::Socket.new(YOUR_APPLICATION_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

1 entries across 1 versions & 1 rubygems

Version Path
pusher-client-0.2.0 examples/hello_pusher_async.rb