Modifier and Type | Field and Description |
---|---|
private java.lang.String |
dnsHostname |
private java.util.List<java.net.InetAddress> |
dnsServers |
Constructor and Description |
---|
BootstrapDns(java.lang.String dnsHostname,
java.util.List<java.net.InetAddress> dnsServers) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.net.InetAddress> |
lookup(java.lang.String hostname)
Returns the IP addresses of
hostname , in the order they will be attempted by OkHttp. |
private final java.lang.String dnsHostname
private final java.util.List<java.net.InetAddress> dnsServers
BootstrapDns(java.lang.String dnsHostname, java.util.List<java.net.InetAddress> dnsServers)
public java.util.List<java.net.InetAddress> lookup(java.lang.String hostname) throws java.net.UnknownHostException
Dns
hostname
, in the order they will be attempted by OkHttp. If
a connection to an address fails, OkHttp will retry the connection with the next address until
either a connection is made, the set of IP addresses is exhausted, or a limit is exceeded.