Home / Function/ handleQueryResp() — netty Function Reference

handleQueryResp() — netty Function Reference

Architecture documentation for the handleQueryResp() function in DoTClient.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  e3f30336_5d9e_1f18_3e77_758d6df5b165["handleQueryResp()"]
  5239d577_66b3_1cd2_3150_13fb7dba265f["DoTClient"]
  e3f30336_5d9e_1f18_3e77_758d6df5b165 -->|defined in| 5239d577_66b3_1cd2_3150_13fb7dba265f
  1055fa45_0611_991b_2283_5b8e5df9faab["main()"]
  1055fa45_0611_991b_2283_5b8e5df9faab -->|calls| e3f30336_5d9e_1f18_3e77_758d6df5b165
  style e3f30336_5d9e_1f18_3e77_758d6df5b165 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/dns/dot/DoTClient.java lines 59–72

    private static void handleQueryResp(DefaultDnsResponse msg) {
        if (msg.count(DnsSection.QUESTION) > 0) {
            DnsQuestion question = msg.recordAt(DnsSection.QUESTION, 0);
            System.out.printf("name: %s%n", question.name());
        }
        for (int i = 0, count = msg.count(DnsSection.ANSWER); i < count; i++) {
            DnsRecord record = msg.recordAt(DnsSection.ANSWER, i);
            if (record.type() == DnsRecordType.A) {
                //just print the IP after query
                DnsRawRecord raw = (DnsRawRecord) record;
                System.out.println(NetUtil.bytesToIpAddress(ByteBufUtil.getBytes(raw.content())));
            }
        }
    }

Domain

Subdomains

Called By

Frequently Asked Questions

What does handleQueryResp() do?
handleQueryResp() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/dns/dot/DoTClient.java.
Where is handleQueryResp() defined?
handleQueryResp() is defined in example/src/main/java/io/netty/example/dns/dot/DoTClient.java at line 59.
What calls handleQueryResp()?
handleQueryResp() is called by 1 function(s): main.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free