testServerCloseShouldNotSendResetIfClientSentEOS() — netty Function Reference
Architecture documentation for the testServerCloseShouldNotSendResetIfClientSentEOS() function in Http2MultiplexTransportTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 13e7fee6_836a_5aad_0cf8_21c198fdeff2["testServerCloseShouldNotSendResetIfClientSentEOS()"] 91fc51f7_5bfd_40ef_a0e8_b98c3ed99f48["Http2MultiplexTransportTest"] 13e7fee6_836a_5aad_0cf8_21c198fdeff2 -->|defined in| 91fc51f7_5bfd_40ef_a0e8_b98c3ed99f48 49a1fa6d_c60e_df61_d1d8_c6767645bd32["channelRead0()"] 13e7fee6_836a_5aad_0cf8_21c198fdeff2 -->|calls| 49a1fa6d_c60e_df61_d1d8_c6767645bd32 style 13e7fee6_836a_5aad_0cf8_21c198fdeff2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java lines 751–852
@Test
public void testServerCloseShouldNotSendResetIfClientSentEOS() throws Exception {
EventLoopGroup group = null;
Channel serverChannel = null;
Channel clientChannel = null;
Channel clientStreamChannel = null;
try {
final CountDownLatch clientReceivedResponseLatch = new CountDownLatch(1);
final CountDownLatch resetFrameLatch = new CountDownLatch(1);
group = new DefaultEventLoop();
LocalAddress serverAddress = new LocalAddress(getClass().getName());
ServerBootstrap sb = new ServerBootstrap()
.channel(LocalServerChannel.class)
.group(group)
.childHandler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(forServer().build());
pipeline.addLast(new Http2FrameIgnore<Http2SettingsFrame>(Http2SettingsFrame.class));
pipeline.addLast(new Http2FrameIgnore<Http2SettingsAckFrame>(Http2SettingsAckFrame.class));
pipeline.addLast(new Http2MultiplexHandler(new ChannelInitializer<Http2StreamChannel>() {
@Override
protected void initChannel(Http2StreamChannel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new Http2StreamFrameToHttpObjectCodec(true, true));
pipeline.addLast(new HttpObjectAggregator(16384));
pipeline.addLast(new SimpleChannelInboundHandler<FullHttpRequest>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, FullHttpRequest msg) {
ctx.writeAndFlush(
new DefaultFullHttpResponse(
msg.protocolVersion(), HttpResponseStatus.OK,
Unpooled.copiedBuffer("hello", CharsetUtil.US_ASCII)))
.addListeners(ChannelFutureListener.CLOSE);
}
});
}
}));
}
});
serverChannel = sb.bind(serverAddress).sync().channel();
Bootstrap cb = new Bootstrap()
.channel(LocalChannel.class)
.group(group)
.handler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(forClient().build());
pipeline.addLast(new Http2FrameIgnore<Http2SettingsFrame>(Http2SettingsFrame.class));
pipeline.addLast(new Http2FrameIgnore<Http2SettingsAckFrame>(Http2SettingsAckFrame.class));
pipeline.addLast(new Http2MultiplexHandler(new ChannelInitializer<Http2StreamChannel>() {
@Override
protected void initChannel(Http2StreamChannel ch) {
// noop
}
}));
}
});
clientChannel = cb.connect(serverAddress).sync().channel();
clientStreamChannel = new Http2StreamChannelBootstrap(clientChannel)
.handler(new ChannelInitializer<Channel>() {
@Override
protected void initChannel(Channel ch) {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new Http2StreamFrameToHttpObjectCodec(false, true));
pipeline.addLast(new HttpObjectAggregator(16384));
pipeline.addLast(new SimpleChannelInboundHandler<FullHttpResponse>() {
@Override
protected void channelRead0(ChannelHandlerContext ctx, FullHttpResponse msg) {
clientReceivedResponseLatch.countDown();
}
});
}
})
.open().sync().get();
clientStreamChannel.writeAndFlush(
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does testServerCloseShouldNotSendResetIfClientSentEOS() do?
testServerCloseShouldNotSendResetIfClientSentEOS() is a function in the netty codebase, defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java.
Where is testServerCloseShouldNotSendResetIfClientSentEOS() defined?
testServerCloseShouldNotSendResetIfClientSentEOS() is defined in codec-http2/src/test/java/io/netty/handler/codec/http2/Http2MultiplexTransportTest.java at line 751.
What does testServerCloseShouldNotSendResetIfClientSentEOS() call?
testServerCloseShouldNotSendResetIfClientSentEOS() calls 1 function(s): channelRead0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free