module Falcon::Environment::Application

def endpoint

@returns [Async::IO::Endpoint]
The endpoint that will be used for communicating with the application server.
def endpoint
	::Falcon::ProxyEndpoint.unix(ipc_path,
		protocol: protocol,
		scheme: scheme,
		authority: authority
	)
end

def ipc_path

@returns [String]
The IPC path to use for communication with the application.
def ipc_path
	::File.expand_path("application.ipc", root)
end

def middleware

@returns [Protocol::HTTP::Middleware]
The middleware stack for the application.
def middleware
	::Protocol::HTTP::Middleware::HelloWorld
end

def protocol

@returns [Async::HTTP::Protocol]

Typically one of {Async::HTTP::Protocol::HTTP1} or {Async::HTTP::Protocl::HTTP2}.

The protocol to use to communicate with the application.
def protocol
	Async::HTTP::Protocol::HTTP2
end

def scheme

@returns [String]
The scheme to use to communicate with the application.
def scheme
	'https'
end