Example usage for com.squareup.okhttp Dns SYSTEM

List of usage examples for com.squareup.okhttp Dns SYSTEM

Introduction

In this page you can find the example usage for com.squareup.okhttp Dns SYSTEM.

Prototype

Dns SYSTEM

To view the source code for com.squareup.okhttp Dns SYSTEM.

Click Source Link

Document

A DNS that uses InetAddress#getAllByName to ask the underlying operating system to lookup IP addresses.

Usage

From source file:co.paralleluniverse.fibers.okhttp.test.utils.original.DoubleInetAddressDns.java

License:Apache License

@Override
public List<InetAddress> lookup(String hostname) throws UnknownHostException {
    List<InetAddress> addresses = Dns.SYSTEM.lookup(hostname);
    return Arrays.asList(addresses.get(0), addresses.get(0));
}

From source file:co.paralleluniverse.fibers.okhttp.test.utils.original.SingleInetAddressDns.java

License:Apache License

@Override
public List<InetAddress> lookup(String hostname) throws UnknownHostException {
    List<InetAddress> addresses = Dns.SYSTEM.lookup(hostname);
    return Collections.singletonList(addresses.get(0));
}