windowUpdatesSendWhenAutoReadEnabled() — netty Function Reference
Architecture documentation for the windowUpdatesSendWhenAutoReadEnabled() function in Http2MultiplexTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ec7e548b_a5de_e9e7_bb59_0d8a7598fd67["windowUpdatesSendWhenAutoReadEnabled()"] 4745ff96_ed57_3bd8_9861_4b786d0b6e09["Http2MultiplexTest"] ec7e548b_a5de_e9e7_bb59_0d8a7598fd67 -->|defined in| 4745ff96_ed57_3bd8_9861_4b786d0b6e09 6ce2543e_bc57_5361_d1ab_3bd1c4c2a047["checkFlush()"] ec7e548b_a5de_e9e7_bb59_0d8a7598fd67 -->|calls| 6ce2543e_bc57_5361_d1ab_3bd1c4c2a047 8df7745b_db2d_ef92_4b30_080373ca9f6d["verifyFramesMultiplexedToCorrectChannel()"] ec7e548b_a5de_e9e7_bb59_0d8a7598fd67 -->|calls| 8df7745b_db2d_ef92_4b30_080373ca9f6d style ec7e548b_a5de_e9e7_bb59_0d8a7598fd67 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java lines 1633–1681
@Test
public void windowUpdatesSendWhenAutoReadEnabled() {
LastInboundHandler inboundHandler = new LastInboundHandler();
FlushSniffer flushSniffer = new FlushSniffer();
parentChannel.pipeline().addFirst(flushSniffer);
Http2StreamChannel childChannel = newInboundStream(3, false, inboundHandler);
childChannel.config().setOption(
Http2StreamChannelOption.AUTO_STREAM_FLOW_CONTROL, false);
assertTrue(childChannel.config().isAutoRead());
childChannel.config().setAutoRead(false);
assertFalse(childChannel.config().isAutoRead());
Http2HeadersFrame headersFrame = inboundHandler.readInbound();
assertNotNull(headersFrame);
assertTrue(flushSniffer.checkFlush());
// Write some bytes to get the channel into the idle state with buffered data and also verify we
// do not dispatch it until we receive a read() call.
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb(16 * 1024), 0, false);
frameInboundWriter.writeInboundData(childChannel.stream().id(), bb(16 * 1024), 0, false);
assertTrue(flushSniffer.checkFlush());
verify(frameWriter, never()).writeWindowUpdate(eqCodecCtx(), anyInt(), anyInt(), anyChannelPromise());
// only the first one was read because it was legacy auto-read behavior.
verifyFramesMultiplexedToCorrectChannel(childChannel, inboundHandler, 1);
assertFalse(flushSniffer.checkFlush());
// Trigger a read of the second frame.
childChannel.read();
verifyFramesMultiplexedToCorrectChannel(childChannel, inboundHandler, 1);
assertFalse(flushSniffer.checkFlush());
verify(frameWriter, never()).writeWindowUpdate(eqCodecCtx(), anyInt(), anyInt(), anyChannelPromise());
childChannel.read();
verify(frameWriter, never()).writeWindowUpdate(eqCodecCtx(), anyInt(), anyInt(), anyChannelPromise());
assertFalse(flushSniffer.checkFlush());
childChannel.config().setOption(
Http2StreamChannelOption.AUTO_STREAM_FLOW_CONTROL, true);
verify(frameWriter).writeWindowUpdate(eqCodecCtx(), eq(0), eq(32 * 1024), anyChannelPromise());
verify(frameWriter).writeWindowUpdate(
eqCodecCtx(), eq(childChannel.stream().id()), eq(32 * 1024), anyChannelPromise());
assertTrue(flushSniffer.checkFlush());
}
Domain
Subdomains
Source
Frequently Asked Questions
What does windowUpdatesSendWhenAutoReadEnabled() do?
windowUpdatesSendWhenAutoReadEnabled() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java.
Where is windowUpdatesSendWhenAutoReadEnabled() defined?
windowUpdatesSendWhenAutoReadEnabled() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTest.java at line 1633.
What does windowUpdatesSendWhenAutoReadEnabled() call?
windowUpdatesSendWhenAutoReadEnabled() calls 2 function(s): checkFlush, verifyFramesMultiplexedToCorrectChannel.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free