@@ -46,35 +46,6 @@ The application will pause at socket.connect and handle events from Pusher as th
4646
4747 socket.connect
4848
49- == Asynchronous Usage
50- The socket will remain open in the background as long as your main application thread is running,
51- and you can continue to subscribe/unsubscribe to channels and bind new events.
52-
53- require 'pusher-client'
54- socket = PusherClient::Socket.new(YOUR_APPLICATION_KEY)
55- socket.connect(true) # Connect asynchronously
56-
57- # Subscribe to two channels
58- socket.subscribe('channel1')
59- socket.subscribe('channel2')
60-
61- # Bind to a global event (can occur on either channel1 or channel2)
62- socket.bind('globalevent') do |data|
63- puts data
64- end
65-
66- # Bind to a channel event (can only occur on channel1)
67- socket['channel1'].bind('channelevent') do |data|
68- puts data
69- end
70-
71- loop do
72- sleep(1) # Keep your main thread running
73- end
74-
75- For further documentation, read the source & test suite. Some features of the JavaScript client
76- are not yet implemented.
77-
7849== Native extension
7950Pusher depends on the websocket[https://github.com/imanel/websocket-ruby] gem
8051which is a pure Ruby implementation of websockets.
@@ -84,7 +55,7 @@ increase by including the websocket-native[https://github.com/imanel/websocket-r
8455gem in your Gemfile.
8556
8657== Contributing to pusher-client
87-
58+
8859* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8960* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9061* Fork the project
0 commit comments