Home / Function/ ProtocolDecoder() — netty Function Reference

ProtocolDecoder() — netty Function Reference

Architecture documentation for the ProtocolDecoder() function in TestDnsServer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  f69c4737_5b67_f746_e057_af2242bb0f3f["ProtocolDecoder()"]
  46c35087_32cd_5c67_6e42_ca3ad96d5f51["TestDnsProtocolUdpCodecFactory"]
  f69c4737_5b67_f746_e057_af2242bb0f3f -->|defined in| 46c35087_32cd_5c67_6e42_ca3ad96d5f51
  style f69c4737_5b67_f746_e057_af2242bb0f3f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

resolver-dns/src/test/java/io/netty/resolver/dns/TestDnsServer.java lines 204–222

        @Override
        public ProtocolDecoder getDecoder(IoSession session) {
            return new ProtocolDecoderAdapter() {
                private final DnsMessageDecoder decoder = new DnsMessageDecoder();

                @Override
                public void decode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws IOException {
                    DnsMessage message = decoder.decode(in);
                    if (dropRecordType != null) {
                        for (QuestionRecord record: message.getQuestionRecords()) {
                            if (record.getRecordType() == dropRecordType) {
                                return;
                            }
                        }
                    }
                    out.write(message);
                }
            };
        }

Domain

Subdomains

Frequently Asked Questions

What does ProtocolDecoder() do?
ProtocolDecoder() is a function in the netty codebase, defined in resolver-dns/src/test/java/io/netty/resolver/dns/TestDnsServer.java.
Where is ProtocolDecoder() defined?
ProtocolDecoder() is defined in resolver-dns/src/test/java/io/netty/resolver/dns/TestDnsServer.java at line 204.

Analyze Your Own Codebase

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

Try Supermodel Free