Home / Function/ streamZeroWindowUpdateIncrementsConnectionWindow() — netty Function Reference

streamZeroWindowUpdateIncrementsConnectionWindow() — netty Function Reference

Architecture documentation for the streamZeroWindowUpdateIncrementsConnectionWindow() function in Http2FrameCodecTest.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d98d4323_41e7_ad9d_f1d1_3dabe657c70f["streamZeroWindowUpdateIncrementsConnectionWindow()"]
  71f17950_8fc4_c3e9_2e13_384d1ac7ea2c["Http2FrameCodecTest"]
  d98d4323_41e7_ad9d_f1d1_3dabe657c70f -->|defined in| 71f17950_8fc4_c3e9_2e13_384d1ac7ea2c
  style d98d4323_41e7_ad9d_f1d1_3dabe657c70f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java lines 596–615

    @Test
    public void streamZeroWindowUpdateIncrementsConnectionWindow() throws Http2Exception {
        Http2Connection connection = frameCodec.connection();
        Http2LocalFlowController localFlow = connection.local().flowController();
        int initialWindowSizeBefore = localFlow.initialWindowSize();
        Http2Stream connectionStream = connection.connectionStream();
        int connectionWindowSizeBefore = localFlow.windowSize(connectionStream);
        // We only replenish the flow control window after the amount consumed drops below the following threshold.
        // We make the threshold very "high" so that window updates will be sent when the delta is relatively small.
        ((DefaultHttp2LocalFlowController) localFlow).windowUpdateRatio(connectionStream, .999f);

        int windowUpdate = 1024;

        channel.write(new DefaultHttp2WindowUpdateFrame(windowUpdate));

        // The initial window size is only changed by Http2Settings, so it shouldn't change.
        assertEquals(initialWindowSizeBefore, localFlow.initialWindowSize());
        // The connection window should be increased by the delta amount.
        assertEquals(connectionWindowSizeBefore + windowUpdate, localFlow.windowSize(connectionStream));
    }

Domain

Subdomains

Frequently Asked Questions

What does streamZeroWindowUpdateIncrementsConnectionWindow() do?
streamZeroWindowUpdateIncrementsConnectionWindow() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java.
Where is streamZeroWindowUpdateIncrementsConnectionWindow() defined?
streamZeroWindowUpdateIncrementsConnectionWindow() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2FrameCodecTest.java at line 596.

Analyze Your Own Codebase

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

Try Supermodel Free