Home / Function/ ByteBuf() — netty Function Reference

ByteBuf() — netty Function Reference

Architecture documentation for the ByteBuf() function in QuicCodecDispatcher.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  fdaf76e1_fbe7_e167_dea3_5a72683ffae5["ByteBuf()"]
  550dceea_3958_0e89_1405_ee683da73397["QuicCodecDispatcher"]
  fdaf76e1_fbe7_e167_dea3_5a72683ffae5 -->|defined in| 550dceea_3958_0e89_1405_ee683da73397
  dcc7626f_cb03_ca66_d737_48297d2f901e["hasShortHeader()"]
  fdaf76e1_fbe7_e167_dea3_5a72683ffae5 -->|calls| dcc7626f_cb03_ca66_d737_48297d2f901e
  style fdaf76e1_fbe7_e167_dea3_5a72683ffae5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java lines 194–219

    @Nullable
    static ByteBuf getDestinationConnectionId(ByteBuf buffer, int localConnectionIdLength) throws QuicException {
        if (buffer.readableBytes() > Byte.BYTES) {
            int offset = buffer.readerIndex();
            boolean shortHeader = hasShortHeader(buffer);
            offset += Byte.BYTES;
            // We are only interested in packets with short header as these the packets that
            // are exchanged after the server did provide the connection id that the client should use.
            if (shortHeader) {
                // See https://www.rfc-editor.org/rfc/rfc9000.html#section-17.3
                // 1-RTT Packet {
                //  Header Form (1) = 0,
                //  Fixed Bit (1) = 1,
                //  Spin Bit (1),
                //  Reserved Bits (2),
                //  Key Phase (1),
                //  Packet Number Length (2),
                //  Destination Connection ID (0..160),
                //  Packet Number (8..32),
                //  Packet Payload (8..),
                //}
                return QuicHeaderParser.sliceCid(buffer, offset, localConnectionIdLength);
            }
        }
        return null;
    }

Domain

Subdomains

Frequently Asked Questions

What does ByteBuf() do?
ByteBuf() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java.
Where is ByteBuf() defined?
ByteBuf() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicCodecDispatcher.java at line 194.
What does ByteBuf() call?
ByteBuf() calls 1 function(s): hasShortHeader.

Analyze Your Own Codebase

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

Try Supermodel Free