# File lib/rack/handler/ftw.rb, line 81
  def run
    # {:environment=>"development", :pid=>nil, :Port=>9292, :Host=>"0.0.0.0",
    #  :AccessLog=>[], :config=>"/home/jls/projects/ruby-ftw/examples/test.ru",
    #  :server=>"FTW"}
    #
    # listen, pass connections off
    #
    # 
    # """A Rack application is an Ruby object (not a class) that responds to
    # call.  It takes exactly one argument, the environment and returns an
    # Array of exactly three values: The status, the headers, and the body."""
    #
    logger.info("Starting server", :config => @config)
    @server = FTW::Server.new([@config[:Host], @config[:Port]].join(":"))
    @server.each_connection do |connection|
      # The rack specification insists that 'rack.input' objects support
      # #rewind. Bleh. Just lie about it and monkeypatch it in.
      # This is required for Sinatra to accept 'post' requests, otherwise
      # it barfs.
      class << connection
        def rewind(*args)
          # lolrack, nothing to do here.
        end
      end

      @threads << Thread.new do
        handle_connection(connection)
      end
    end
  end