Home / Function/ findVersion() — netty Function Reference

findVersion() — netty Function Reference

Architecture documentation for the findVersion() function in HAProxyMessageDecoder.java from the netty codebase.

Function java Buffer Allocators calls 1 called by 1

Entity Profile

Dependency Diagram

graph TD
  a6d80843_53e8_c46e_df6c_c1c99ea1a37a["findVersion()"]
  779adff2_46a7_a104_ccd9_84680387d552["HAProxyMessageDecoder"]
  a6d80843_53e8_c46e_df6c_c1c99ea1a37a -->|defined in| 779adff2_46a7_a104_ccd9_84680387d552
  5c5e7bc9_025c_6ef6_d933_6646e8180072["decode()"]
  5c5e7bc9_025c_6ef6_d933_6646e8180072 -->|calls| a6d80843_53e8_c46e_df6c_c1c99ea1a37a
  5118ce8f_1171_e837_05e2_e7fad6a7ed1b["match()"]
  a6d80843_53e8_c46e_df6c_c1c99ea1a37a -->|calls| 5118ce8f_1171_e837_05e2_e7fad6a7ed1b
  style a6d80843_53e8_c46e_df6c_c1c99ea1a37a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoder.java lines 168–177

    private static int findVersion(final ByteBuf buffer) {
        final int n = buffer.readableBytes();
        // per spec, the version number is found in the 13th byte
        if (n < 13) {
            return -1;
        }

        int idx = buffer.readerIndex();
        return match(BINARY_PREFIX, buffer, idx) ? buffer.getByte(idx + BINARY_PREFIX_LENGTH) : 1;
    }

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does findVersion() do?
findVersion() is a function in the netty codebase, defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoder.java.
Where is findVersion() defined?
findVersion() is defined in codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessageDecoder.java at line 168.
What does findVersion() call?
findVersion() calls 1 function(s): match.
What calls findVersion()?
findVersion() is called by 1 function(s): decode.

Analyze Your Own Codebase

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

Try Supermodel Free