Example usage for io.netty.handler.codec.dns DnsRecordType OPT

List of usage examples for io.netty.handler.codec.dns DnsRecordType OPT

Introduction

In this page you can find the example usage for io.netty.handler.codec.dns DnsRecordType OPT.

Prototype

DnsRecordType OPT

To view the source code for io.netty.handler.codec.dns DnsRecordType OPT.

Click Source Link

Document

Option record RFC 2671 This is a pseudo DNS record type needed to support EDNS.

Usage

From source file:io.vertx.core.dns.impl.fix.DnsQueryContext.java

License:Apache License

DnsQueryContext(DnsNameResolver parent, InetSocketAddress nameServerAddr, DnsQuestion question,
        Iterable<DnsRecord> additional, Promise<AddressedEnvelope<DnsResponse, InetSocketAddress>> promise) {

    this.parent = checkNotNull(parent, "parent");
    this.nameServerAddr = checkNotNull(nameServerAddr, "nameServerAddr");
    this.question = checkNotNull(question, "question");
    this.additional = checkNotNull(additional, "additional");
    this.promise = checkNotNull(promise, "promise");
    recursionDesired = parent.isRecursionDesired();
    id = parent.queryContextManager.add(this);

    if (parent.isOptResourceEnabled()) {
        optResource = new DefaultDnsRawRecord(StringUtil.EMPTY_STRING, DnsRecordType.OPT,
                parent.maxPayloadSize(), 0, Unpooled.EMPTY_BUFFER);
    } else {/*from   w w  w. java  2  s . co m*/
        optResource = null;
    }
}