TsgcQUICServer › Properties › Host
Bind address for the listener. It accepts an IPv4 address, an IPv6 address or a host name, and binds every interface when it is left empty.
property Host: String read FHost write FHost;
'' (Delphi), "0.0.0.0" (.NET)
Host is inherited from the UDP server base class and selects the local interface the listener binds to.
The Delphi listener binds the address you set. When Start creates the listener it resolves Host and binds the UDP socket to that address, so the server accepts QUIC connections on that interface only. An empty Host binds the dual-stack IPv6 wildcard ::, so a single listener accepts both IPv6 and IPv4 peers on the port. On a machine with no IPv6 stack it falls back to 0.0.0.0, the IPv4 wildcard. This applies to both QUIC engines, the OpenSSL built-in engine and the sgc engine (see QUICMode). If Host cannot be resolved, Start raises QUIC Server: Failed to resolve bind address "<host>", so wrap the call in a try..except as usual.
The address family follows the value you set. A Host holding a colon is treated as an IPv6 literal, in the bare form ::1 or in the bracketed form [::1] used inside URLs. Any other value, an IPv4 literal or a host name, is resolved over both families, so a name that publishes only AAAA records binds too. When a name resolves to several addresses, each candidate is tried in the order the operating system returns them until one of them binds.
In the .NET implementation Host is honored the same way: it is parsed into the listener endpoint, where an empty value or 0.0.0.0 means all IPv4 interfaces, :: means all IPv6 interfaces, and any other value is parsed as an IP address (an unparseable value falls back to all IPv4 interfaces).
Host is public but not published by TsgcQUICServer, so it is assigned from code.
oServer := TsgcQUICServer.Create(nil);
// restricts the listener to this interface, leave empty to bind every interface
oServer.Host := '192.168.1.10';
oServer.Port := 4433;
oServer.QUICOptions.SSLOptions.CertFile := 'cert.pem';
oServer.QUICOptions.SSLOptions.KeyFile := 'key.pem';
oServer.Start;