Example usage for io.vertx.core.dns DnsClient lookup6

List of usage examples for io.vertx.core.dns DnsClient lookup6

Introduction

In this page you can find the example usage for io.vertx.core.dns DnsClient lookup6.

Prototype

@Fluent
DnsClient lookup6(String name, Handler<AsyncResult<@Nullable String>> handler);

Source Link

Document

Try to lookup the AAAA (ipv6) record for the given name.

Usage

From source file:examples.DNSExamples.java

License:Open Source License

public void example4(Vertx vertx) {
    DnsClient client = vertx.createDnsClient(53, "10.0.0.1");
    client.lookup6("vertx.io", ar -> {
        if (ar.succeeded()) {
            System.out.println(ar.result());
        } else {/* w w  w  .ja  v a  2 s.c om*/
            System.out.println("Failed to resolve entry" + ar.cause());
        }
    });
}