use of io.vertx.core.impl.resolver.DnsResolverProvider in project vert.x by eclipse.
the class VertxImpl method createDnsClient.
@Override
public DnsClient createDnsClient(DnsClientOptions options) {
String host = options.getHost();
int port = options.getPort();
if (host == null || port < 0) {
DnsResolverProvider provider = new DnsResolverProvider(this, addressResolverOptions);
InetSocketAddress address = provider.nameServerAddresses().get(0);
// provide the host and port
options = new DnsClientOptions(options).setHost(address.getAddress().getHostAddress()).setPort(address.getPort());
}
return new DnsClientImpl(this, options);
}
Aggregations