TsgcUDPCLient › Properties › IPVersion
Selects the IP stack (IPv4 or IPv6) used by the UDP socket.
property IPVersion: TIdIPVersion read GetIPVersion write SetIPVersion;
—
Controls whether the client creates an IPv4 (Id_IPv4) or IPv6 (Id_IPv6) datagram socket and how the Host property is resolved. Set this before sending the first datagram; changing it afterwards may require the socket to be recreated. When a literal IPv6 address is placed in Host, IPVersion must be set to Id_IPv6 or name resolution will fail.
oClient.IPVersion := Id_IPv4;
oClient.Host := '127.0.0.1';
oClient.Port := 5000;