DialDualStack dials the given TCP addr using both tcp4 and tcp6.
This function has the following additional features comparing to net.Dial:
* It reduces load on DNS resolver by caching resolved TCP addressed for DefaultDNSCacheDuration. * It dials all the resolved TCP addresses in round-robin manner until connection is established. This may be useful if certain addresses are temporarily unreachable. * It returns ErrDialTimeout if connection cannot be established during DefaultDialTimeout seconds. Use DialDualStackTimeout for custom dial timeout.
This dialer is intended for custom code wrapping before passing to Client.Dial or HostClient.Dial.
For instance, per-host counters and/or limits may be implemented by such wrappers.
The addr passed to the function must contain port. Example addr values:
* foobar.baz:443 * foo.bar:80 * aaa.com:8080