Examples of DnsQuery


Examples of io.netty.handler.codec.dns.DnsQuery

        }

        remainingTries --;

        final InetSocketAddress nameServerAddr = nameServerAddresses.next();
        final DnsQuery query = new DnsQuery(id, nameServerAddr);
        query.addQuestion(question);
        query.header().setRecursionDesired(recursionDesired);
        query.addAdditionalResource(optResource);

        final DatagramChannel ch = parent.ch;

        if (logger.isDebugEnabled()) {
            logger.debug("{} WRITE: [{}: {}], {}", ch, id, nameServerAddr, question);
View Full Code Here

Examples of io.vertx.core.dns.impl.netty.DnsQuery

  private void lookup(String name, Future result, int... types) {
    Objects.requireNonNull(name, "no null name accepted");
    bootstrap.connect(dnsServer).addListener(new RetryChannelFutureListener(result) {
      @Override
      public void onSuccess(ChannelFuture future) throws Exception {
        DnsQuery query = new DnsQuery(ThreadLocalRandom.current().nextInt());
        for (int type: types) {
          query.addQuestion(new DnsQuestion(name, type));
        }
        future.channel().writeAndFlush(query).addListener(new RetryChannelFutureListener(result) {
          @Override
          public void onSuccess(ChannelFuture future) throws Exception {
            future.channel().pipeline().addLast(new SimpleChannelInboundHandler<DnsResponse>() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.