class Qwik::MongrelServer

Public Class Methods

new(qconfig) click to toggle source
# File vendor/qwik/lib/qwik/mongrel-server.rb, line 15
def initialize(qconfig)
  @qconfig = qconfig
  @memory  = ServerMemory.new(@qconfig)

  # init_trap
  trap(:TERM) { shutdown; }
  trap(:INT)  { shutdown; }
  if Signal.list.key?("HUP")
    trap(:HUP)  { reopen; }
  end

  init_directory(@qconfig)
end

Public Instance Methods

start() click to toggle source
# File vendor/qwik/lib/qwik/mongrel-server.rb, line 29
def start
  bind_address = config.bind_address
  port = config.web_port

  h = Mongrel::HttpServer.new(bind_address, port)
  h.register('/', MongrelHandler.new)
  start_server
  h.run.join
end