These are chat archives for IndySockets/Indy

1st
Aug 2016
davidpn
@davidpn
Aug 01 2016 01:58
@rlebeau There was a post in .winsock about IdZLib not compiling.. not sure if it's because of stuff you were were doing recently
is Indy supposed to handle IPv6 "automatically"?
Remy Lebeau
@rlebeau
Aug 01 2016 17:16
not "automatically", no. You need to manually set the connection's IPVersion property to Id_IPv6 (unless you recompile Indy with IdIPv6 defined in IdCompilerDefines.inc, then IPVersion will default to Id_IPv6). In the case of TIdHTTP specifically, it obtains server info from a URL instead of set properties, so if you want to connect to an HTTP/S server using IPv6, you need to wrap the host portion of the URL in brackets. RFCs 2732 and 3986 require brackets around IPv6 IP addresses only, but TIdHTTP currently requires brackets around hostnames as well if you want it to perform an IPv6 DNS lookup. Indy is currently dependant on the IPVersion property being set and is not coded to resolve a hostname to both IPv4 and IPv6 at the same time and then attempt every address reported until a connection is successful. It lookups a hostname to either IPv4 or IPv6 only and then attempts a connection to the first IP reported only.
davidpn
@davidpn
Aug 01 2016 21:51
ok, is there a way of determining whether an OS supports IPv6 or do we need to use TOSVersion.Check or something?
Remy Lebeau
@rlebeau
Aug 01 2016 21:56
GStack.SupportsIPv6
There is currently no GStack.SupportsIPv4, though (in work) to handle the case of IPv6-only systems.