Module: Lich::Main::BindAddressOption
- Defined in:
- documented/main/bind_address_option.rb
Overview
Applies keyword resolution to the parsed --bind-address value, giving
it the same host vocabulary as --detachable-client / --headless:
tailscale, lan, any, an IP address, or a hostname.
Resolution happens once at startup, so every listener Lich opens (the
frontend socket, the --game proxy, and a detachable client that
inherits the bind address) binds the same concrete address -- and a
keyword failure (say, Tailscale not running) is reported before any
socket work begins.
Defined Under Namespace
Classes: Result
Class Method Summary collapse
-
.apply(token, resolver: Lich::Common::BindHostResolver) ⇒ Result
Resolves the raw --bind-address token.
Class Method Details
.apply(token, resolver: Lich::Common::BindHostResolver) ⇒ Result
Resolves the raw --bind-address token.
32 33 34 35 36 37 38 39 |
# File 'documented/main/bind_address_option.rb', line 32 def self.apply(token, resolver: Lich::Common::BindHostResolver) return Result.new if token.nil? resolution = resolver.resolve(token) Result.new(host: resolution.host, warning: resolution.warning) rescue Lich::Common::BindHostResolver::Error => e Result.new(error: e.) end |