Package 

Interface Dns


  • 
    public interface Dns
    
                        

    A domain name service that resolves IP addresses for host names. Most applications will use the system DNS service, which is the default. Some applications may provide their own implementation to use a different DNS server, to prefer IPv6 addresses, to prefer IPv4 addresses, or to force a specific known IP address.

    Implementations of this interface must be safe for concurrent use.

    • Method Summary

      Modifier and Type Method Description
      abstract List<InetAddress> lookup(String hostname) Returns the IP addresses of {@code hostname}, in the order they will be attempted by OkHttp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • lookup

         abstract List<InetAddress> lookup(String hostname)

        Returns the IP addresses of {@code hostname}, in the order they will be attempted by OkHttp. Ifa connection to an address fails, OkHttp will retry the connection with the next address untileither a connection is made, the set of IP addresses is exhausted, or a limit is exceeded.