I'm getting dual-stack wrong...

The correct way of doing things is to:

  * run getaddrinfo with AF_UNSPEC
  * create the socket after that using the domain (AF_INET or AF_INET6) 
returned by getaddrinfo



The problem is that the Nim standard library does things in the wrong order, it 
first creates the socket (and you have to choose AF_INET or AF_INET6 before 
resolving the DNS and knowing if it will be IPv4 or IPv6). When resolving the 
address, if the address type does not match it will not work.

Reply via email to