roda-websockets
The roda-websockets gem integrates async-websockets into the roda web toolkit. Use this plugin for asynchronous websockets alongside roda and falcon.
Installation
gem install roda-websockets
Source Code
Source code is available on GitHub at
https://github.com/havenwood/roda-websockets
Usage
roda-websockets requires that you use Falcon as your web server in order to establish asynchronous websocket connections.
falcon serve --bind http://localhost:3000 --count 1 --config config.ru
roda-websockets is a roda plugin, so you need to load it into your roda
application similar to other plugins:
class App < Roda
plugin :websockets
end
In your routing block, you can use r.websocket
to pass the routing
to a websocket connection.
r.websocket do |connection|
end