Home / Function/ verifyFirstFrameIsSettings() — netty Function Reference

verifyFirstFrameIsSettings() — netty Function Reference

Architecture documentation for the verifyFirstFrameIsSettings() function in Http2ConnectionHandler.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  c95ea991_3080_fce0_ff9f_9e2917aa74d9["verifyFirstFrameIsSettings()"]
  83642a58_aebe_1c6a_ae68_9c2017752662["PrefaceDecoder"]
  c95ea991_3080_fce0_ff9f_9e2917aa74d9 -->|defined in| 83642a58_aebe_1c6a_ae68_9c2017752662
  7a6947b9_edc8_6ed8_f6ad_f257a2519043["decode()"]
  7a6947b9_edc8_6ed8_f6ad_f257a2519043 -->|calls| c95ea991_3080_fce0_ff9f_9e2917aa74d9
  style c95ea991_3080_fce0_ff9f_9e2917aa74d9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java lines 346–365

        private boolean verifyFirstFrameIsSettings(ByteBuf in) throws Http2Exception {
            if (in.readableBytes() < 5) {
                // Need more data before we can see the frame type for the first frame.
                return false;
            }

            short frameType = in.getUnsignedByte(in.readerIndex() + 3);
            if (frameType != SETTINGS) {
                throw connectionError(PROTOCOL_ERROR, "First received frame was not SETTINGS. " +
                                                      "Hex dump for first 5 bytes: %s",
                                      hexDump(in, in.readerIndex(), 5));
            }
            short flags = in.getUnsignedByte(in.readerIndex() + 4);
            if ((flags & Http2Flags.ACK) != 0) {
                throw connectionError(PROTOCOL_ERROR, "First received frame was SETTINGS frame but had ACK flag set. " +
                        "Hex dump for first 5 bytes: %s",
                        hexDump(in, in.readerIndex(), 5));
            }
            return true;
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does verifyFirstFrameIsSettings() do?
verifyFirstFrameIsSettings() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java.
Where is verifyFirstFrameIsSettings() defined?
verifyFirstFrameIsSettings() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java at line 346.
What calls verifyFirstFrameIsSettings()?
verifyFirstFrameIsSettings() 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