lib/sinatra-rocketio/application.rb in sinatra-rocketio-0.0.4 vs lib/sinatra-rocketio/application.rb in sinatra-rocketio-0.0.5
- old
+ new
@@ -6,15 +6,14 @@
EM::defer do
while !EM::reactor_running? do
sleep 1
end
if options[:comet]
- require 'sinatra/cometio'
app.register Sinatra::CometIO
end
if options[:websocket]
- require 'sinatra/websocketio'
app.register Sinatra::WebSocketIO
+ Sinatra::WebSocketIO.start
end
app.get '/rocketio/rocketio.js' do
content_type 'application/javascript'
@js ||= ERB.new(Sinatra::RocketIO.javascript).result(binding)
end