TsgcUDPCLient › Properties › Host
IP address or DNS hostname of the destination UDP peer or server.
property Host: String read GetHost write SetHost;
—
Specifies the default destination address used when sending datagrams with the parameterless overloads of WriteData. Accepts IPv4 literals (e.g. 127.0.0.1), IPv6 literals or DNS names which are resolved according to the value of IPVersion. For each outgoing datagram the component may also override this address by supplying an explicit aIPAddress parameter. When DTLS is enabled, Host also identifies the peer whose certificate is validated during the handshake.
oClient := TsgcUDPClient.Create(nil);
oClient.Host := '127.0.0.1';
oClient.Port := 5000;
oClient.WriteData('hello');