Module: Compp

Defined in:
lib/compp.rb,
lib/compp/default.rb,
lib/compp/sprinkler.rb,
lib/compp/connection.rb

Defined Under Namespace

Classes: Connection, Default, Sprinkler

Class Method Summary collapse

Class Method Details

.start(klass, options = {}) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/compp.rb', line 13

def self.start(klass, options = {})
  EM.epoll
  host = options[:host] || "0.0.0.0"
  port =  Integer(options[:port] || 8989)
  EM.run {
    EM.start_server(host, port, klass, options)
  }
end