class Falcon::Host

def authority

def authority
	@evaluator.authority
end

def bound_endpoint

def bound_endpoint
	@evaluator.bound_endpoint
end

def endpoint

def endpoint
	@evaluator.endpoint
end

def name

def name
	"Falcon Host for #{self.authority}"
end

def root

def root
	@evaluator.root
end

def run(container)

def run(container)
	if @environment.include?(:server)
		bound_endpoint = self.bound_endpoint
		
		container.run(name: self.name, restart: true) do |task, instance|
			Async.logger.info(self) {"Starting application server, binding to #{self.endpoint}..."}
			
			server = @evaluator.server
			
			server.run
			
			task.children.each(&:wait)
		end
		
		container.attach do
			bound_endpoint.close
		end
	end
end

def ssl_context

def ssl_context
	@evaluator.ssl_context
end

def to_s

def to_s
	"\#<#{self.class} #{@evaluator.authority}>"
end