# File lib/phusion_passenger/request_handler.rb, line 88
        def initialize(owner_pipe, options = {})
                require_option(options, "app_group_name")
                install_options_as_ivars(self, options,
                        "app",
                        "app_group_name",
                        "connect_password",
                        "detach_key",
                        "analytics_logger",
                        "pool_account_username"
                )
                @thread_handler = options["thread_handler"] || ThreadHandler
                @concurrency = 1
                if options["pool_account_password_base64"]
                        @pool_account_password = options["pool_account_password_base64"].unpack('m').first
                end

                #############
                #############

                @server_sockets = {}
                
                if should_use_unix_sockets?
                        @main_socket_address, @main_socket = create_unix_socket_on_filesystem
                else
                        @main_socket_address, @main_socket = create_tcp_socket
                end
                @server_sockets[:main] = {
                        :address     => @main_socket_address,
                        :socket      => @main_socket,
                        :protocol    => :session,
                        :concurrency => @concurrency
                }

                @http_socket_address, @http_socket = create_tcp_socket
                @server_sockets[:http] = {
                        :address     => @http_socket_address,
                        :socket      => @http_socket,
                        :protocol    => :http,
                        :concurrency => 1
                }
                
                @owner_pipe = owner_pipe
                @options = options
                @previous_signal_handlers = {}
                @main_loop_generation  = 0
                @main_loop_thread_lock = Mutex.new
                @main_loop_thread_cond = ConditionVariable.new
                @threads = []
                @threads_mutex = Mutex.new
                @soft_termination_linger_time = 3
                @main_loop_running  = false
                
                #############
        end