Pass an
addrinfo
structure to specify the type (IPv4 or IPv6). See the
getaddrinfo()[
^] function and the
addrinfo[
^] structure. When passing no
addrinfo
structure or setting the
ai_family
member to
AF_UNSPEC
, the returned family type is IPv6 when it is installed (always with Vista and later).