Home / Function/ increaseReceivedBytes() — netty Function Reference

increaseReceivedBytes() — netty Function Reference

Architecture documentation for the increaseReceivedBytes() function in DefaultHttp2ConnectionDecoder.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  58013060_d6e1_1a48_4dbc_eb77bb9f66cf["increaseReceivedBytes()"]
  cfd8223c_5f61_2fca_8425_a5a38fb3c92c["ContentLength"]
  58013060_d6e1_1a48_4dbc_eb77bb9f66cf -->|defined in| cfd8223c_5f61_2fca_8425_a5a38fb3c92c
  472f71a8_ad4a_5ddf_ef48_0ce742954e37["verifyContentLength()"]
  472f71a8_ad4a_5ddf_ef48_0ce742954e37 -->|calls| 58013060_d6e1_1a48_4dbc_eb77bb9f66cf
  style 58013060_d6e1_1a48_4dbc_eb77bb9f66cf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java lines 808–833

        void increaseReceivedBytes(boolean server, int streamId, int bytes, boolean isEnd) throws Http2Exception {
            seen += bytes;
            // Check for overflow
            if (seen < 0) {
                throw streamError(streamId, PROTOCOL_ERROR,
                        "Received amount of data did overflow and so not match content-length header %d", expected);
            }
            // Check if we received more data then what was advertised via the content-length header.
            if (seen > expected) {
                throw streamError(streamId, PROTOCOL_ERROR,
                        "Received amount of data %d does not match content-length header %d", seen, expected);
            }

            if (isEnd) {
                if (seen == 0 && !server) {
                    // This may be a response to a HEAD request, let's just allow it.
                    return;
                }

                // Check that we really saw what was told via the content-length header.
                if (expected > seen) {
                    throw streamError(streamId, PROTOCOL_ERROR,
                            "Received amount of data %d does not match content-length header %d", seen, expected);
                }
            }
        }

Domain

Subdomains

Frequently Asked Questions

What does increaseReceivedBytes() do?
increaseReceivedBytes() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java.
Where is increaseReceivedBytes() defined?
increaseReceivedBytes() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2ConnectionDecoder.java at line 808.
What calls increaseReceivedBytes()?
increaseReceivedBytes() is called by 1 function(s): verifyContentLength.

Analyze Your Own Codebase

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

Try Supermodel Free