Package io.netty.handler.codec.dns

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


        allowedQueries = maxAllowedQueries;
    }

    void resolve() {
        for (InternetProtocolFamily f: resolveAddressTypes) {
            final DnsType type;
            switch (f) {
            case IPv4:
                type = DnsType.A;
                break;
            case IPv6:
View Full Code Here


            }
        });
    }

    void onResponse(final DnsQuestion question, final DnsResponse response) {
        final DnsType type = question.type();
        try {
            if (type == DnsType.A || type == DnsType.AAAA) {
                onResponseAorAAAA(type, question, response);
            } else if (type == DnsType.CNAME) {
                onResponseCNAME(question, response);
View Full Code Here

        // We often get a bunch of CNAMES as well when we asked for A/AAAA.
        final Map<String, String> cnames = buildAliasMap(response);

        boolean found = false;
        for (DnsResource r: response.answers()) {
            final DnsType type = r.type();
            if (type != DnsType.A && type != DnsType.AAAA) {
                continue;
            }

            final String qName = question.name().toLowerCase(Locale.US);
View Full Code Here

    }

    private static Map<String, String> buildAliasMap(DnsResponse response) {
        Map<String, String> cnames = null;
        for (DnsResource r: response.answers()) {
            final DnsType type = r.type();
            if (type != DnsType.CNAME) {
                continue;
            }

            String content = decodeDomainName(r.content());
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.dns.DnsType

Copyright © 2018 www.massapicom. 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.