Skip to content

Commit

Permalink
Add sending data to example
Browse files Browse the repository at this point in the history
  • Loading branch information
rykov committed Mar 15, 2013
1 parent c568fbe commit f7d3ea2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ request.errback { |*args|

request.callback {
puts "[websocket] Successfully connected"
http.send("Hello there!")
}

request.disconnect {
puts "[websocket] disconnected"
}

request.stream { |chunk, type|
process_data(chunk, type)
response = process_data(chunk, type)
http.send(response)
}
```

0 comments on commit f7d3ea2

Please sign in to comment.