Description

Dial dials the given TCP addr using tcp4.

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 DialTimeout for customizing 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

Dial is referenced in 1 repository

github.com/valyala/fasthttp