TsgcUDPServer › Properties › IPVersion
Selects the IP stack (IPv4 or IPv6) used by the UDP listener when a binding is created from Host and Port.
property IPVersion: TIdIPVersion read FIPVersion write FIPVersion;
—
Controls whether the server creates an IPv4 (Id_IPv4) or IPv6 (Id_IPv6) datagram socket for the default binding synthesized from Host and Port. When Bindings is populated directly, each TIdSocketHandle carries its own IPVersion and this property is ignored for those entries, which allows the same component to listen on a mix of IPv4 and IPv6 sockets. Set IPVersion before activating the server; changing it while Active is True has no effect until the listener is restarted.
oServer.IPVersion := Id_IPv6;
oServer.Host := '::';
oServer.Port := 5000;