    # File lib/phusion_passenger/app_process.rb, line 114
            def self.read_from_channel(channel)
                    app_root, pid, n_server_sockets = channel.read
                    if app_root.nil?
                            raise IOError, "Connection closed"
                    end

                    server_sockets = {}
                    n_server_sockets.to_i.times do
                            message = channel.read
                            if message.nil?
                                    raise IOError, "Connection closed"
                            end
                            name = message.shift
                            server_sockets[name.to_sym] = message
                    end

                    owner_pipe = channel.recv_io

                    return new(app_root, pid.to_i, owner_pipe, server_sockets)
            end