class Falcon::ProxyEndpoint

An endpoint suitable for proxing requests, typically via a unix pipe.

def self.unix(path, **options)

@returns [ProxyEndpoint]
Create a proxy unix endpoint with the specific path.
def self.unix(path, **options)
	self.new(::IO::Endpoint.unix(path), **options)
end

def authority

@returns [String]
e.g. `"myapp.com"`.
The authority to use for this endpoint.
def authority
	@options[:authority]
end

def bind(&block)

Bind to the endpoint.
def bind(&block)
	@endpoint.bind(&block)
end

def connect(&block)

Connect to the endpoint.
def connect(&block)
	@endpoint.connect(&block)
end

def each

@parameter endpoint [ProxyEndpoint]
@yields {|endpoint| ...}
If the endpoint has multiple underlying endpoints, this will enumerate them individually.
Enumerate the endpoint.
def each
	return to_enum unless block_given?
	
	@endpoint.each do |endpoint|
		yield self.class.new(endpoint, **@options)
	end
end

def initialize(endpoint, **options)

@parameter endpoint [::IO::Endpoint::Generic] The endpoint which will be used for connecting/binding.
Initialize the proxy endpoint.
def initialize(endpoint, **options)
	super(**options)
	
	@endpoint = endpoint
end

def protocol

@returns [Async::HTTP::Protocol] A specific protocol, e.g. {Async::HTTP::Protocol::HTTP1}
The protocol to use for this connection.
def protocol
	@options[:protocol]
end

def scheme

@returns [String]
e.g. `"http"`.
The scheme to use for this endpoint.
def scheme
	@options[:scheme]
end

def to_s

def to_s
	"\#<#{self.class} protocol=#{self.protocol} endpoint=#{@endpoint}>"
end