Class: Hara::Server
- Inherits:
-
Object
- Object
- Hara::Server
- Defined in:
- lib/hara/server.rb
Class Method Summary collapse
Class Method Details
.start(host, port, options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/hara/server.rb', line 7 def start host, port, = {} puts "Server starting on #{host}:#{port}" = .merge(host: host, port: port) EM.epoll EM.run do EM::WebSocket.run() do |ws| ws.onopen { |handshake| Hara.filter_pool.async.run_filter handshake, ws } end end end |