Class: Ramaze::Adapter::Thin

Inherits:
Base show all
Defined in:
lib/ramaze/adapter/thin.rb

Class Method Summary collapse

Methods inherited from Base

before, before_call, call, middleware_respond, respond, start, stop

Class Method Details

.run_server(host, port) ⇒ Object

start server on given host and port.



10
11
12
13
14
15
16
17
18
# File 'lib/ramaze/adapter/thin.rb', line 10

def run_server host, port
  server = ::Thin::Server.new(host, port, self)
  ::Thin::Logging.silent = true
  server.timeout = 3

  thread = Thread.new{ server.start }
  thread[:adapter] = server
  thread
end