Home / Function/ handleQueryResp() — netty Function Reference

handleQueryResp() — netty Function Reference

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

Function java Buffer Search called by 1

Entity Profile

Dependency Diagram

graph TD
  2c8b9319_0bcc_d629_b998_8b21ecf245a6["handleQueryResp()"]
  2163a46b_2065_a299_066e_84c6fa29ec99["TcpDnsServer"]
  2c8b9319_0bcc_d629_b998_8b21ecf245a6 -->|defined in| 2163a46b_2065_a299_066e_84c6fa29ec99
  1404dde2_6698_e33d_44ec_c96c503e47f2["clientQuery()"]
  1404dde2_6698_e33d_44ec_c96c503e47f2 -->|calls| 2c8b9319_0bcc_d629_b998_8b21ecf245a6
  style 2c8b9319_0bcc_d629_b998_8b21ecf245a6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java lines 154–167

    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/tcp/TcpDnsServer.java.
Where is handleQueryResp() defined?
handleQueryResp() is defined in example/src/main/java/io/netty/example/dns/tcp/TcpDnsServer.java at line 154.
What calls handleQueryResp()?
handleQueryResp() is called by 1 function(s): clientQuery.

Analyze Your Own Codebase

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

Try Supermodel Free