> 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.

Yah, it's a bit annoying working with dual stack. I've come to like IPv6 
though. It works nicely in number of scenarios.

One limit with `connect` and not providing a string seems to be [ssl 
support](https://github.com/nim-lang/Nim/blob/3f7e1d7daadf4002da1a155d7b98ff7fcca9e2fa/lib/pure/net.nim#L2072C7-L2072C69).
 :/

The ability to do use `AF_UNSPEC` could be handy in `newSocket` though. 

Reply via email to