Sha256: 4ca47f6d4d9cf2387d73cae8fc74648afec5d4a9c2ed67dc4d0526cdd0dedfc6
Contents?: true
Size: 1.57 KB
Versions: 1
Compression:
Stored size: 1.57 KB
Contents
= PusherClient pusher-client is a ruby gem for consuming WebSockets from the Pusher webservice[http://pusherapp.com] It is driven by event-machine and maintains a connection to Pusher in its own thread. == Installation gem install pusher-client == Usage # Configuration require 'pusher-client' PusherClient.logger = Logger.new(STDOUT) socket = PusherClient::Socket.new(YOUR_APPLICATION_KEY) socket.connect # Bind to a global event socket.bind('globalevent') do |data| # Do something end # Subscribe to a channel socket.subscribe('mychannel') # Bind to a channel event socket['mychannel'].bind('channelevent') do |data| # Do something end # Disconnect socket.disconnect For further documentation, read the source & test suite. Some features of the JavaScript client are not yet implemented. == Contributing to pusher-client * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it * Fork the project * Start a feature/bugfix branch * Commit and push until you are happy with your contribution * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally. * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it. == Copyright Copyright (c) 2010 Logan Koester. See LICENSE.txt for further details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pusher-client-0.1.0 | README.rdoc |