TsgcUDPServerProperties › Host

Host Property

Local IP address the server listens on when Bindings is empty; leave blank to accept on every interface.

Syntax

property Host: String read FHost write FHost;

Default Value

Remarks

When Bindings is empty at activation time, the server synthesizes a single binding using Host and Port: an empty string binds every local interface (0.0.0.0 for IPv4 or :: for IPv6), while an explicit address restricts the listener to that interface. Host is ignored when Bindings already contains entries. Accepts IPv4 literals, IPv6 literals or DNS names that are resolved according to the current IPVersion value; it must be set before calling Start or assigning Active := True.

Example

oServer.Host := '192.168.1.10';
oServer.Port := 5000;
oServer.Active := True;

Back to Properties