Sha256: 028f95d17c47aeeda8ba5d9423964af101d1004a824cd3fdc8da51721c009966
Contents?: true
Size: 358 Bytes
Versions: 2
Compression:
Stored size: 358 Bytes
Contents
require 'lib/em-websocket' require 'sinatra/base' require 'thin' EM.run do class App < Sinatra::Base get '/' do end end EM::WebSocket.start(:host => '0.0.0.0', :port => 3001) do # Websocket code here end # You could also use Rainbows! instead of Thin. # Any EM based Rack handler should do. # Thin.start App, '0.0.0.0', 3000 end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
em-websocket-0.1.4 | examples/srv.rb |
em-websocket-0.1.3 | examples/srv.rb |