testLateAutoRead() — netty Function Reference
Architecture documentation for the testLateAutoRead() function in IoUringAutoReadTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD a8e6b5c6_90ca_c5fb_cff6_a8488111dfd5["testLateAutoRead()"] 41674e9f_1b3e_5289_3334_fce73410961a["IoUringAutoReadTest"] a8e6b5c6_90ca_c5fb_cff6_a8488111dfd5 -->|defined in| 41674e9f_1b3e_5289_3334_fce73410961a style a8e6b5c6_90ca_c5fb_cff6_a8488111dfd5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringAutoReadTest.java lines 43–80
@Test
@Timeout(value = 1, unit = TimeUnit.MINUTES)
public void testLateAutoRead() throws Exception {
IoEventLoopGroup group = new MultiThreadIoEventLoopGroup(1, IoUringIoHandler.newFactory());
try {
ServerSocketChannel server = (ServerSocketChannel) new ServerBootstrap()
.group(group)
.channel(IoUringServerSocketChannel.class)
.childHandler(new ChannelInboundHandlerAdapter() {
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
ctx.channel().config().setAutoRead(false);
ctx.writeAndFlush(msg, ctx.voidPromise());
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) {
ctx.read();
}
})
.bind(0).sync().channel();
try (Socket sock = new Socket(server.localAddress().getAddress(), server.localAddress().getPort())) {
OutputStream out = sock.getOutputStream();
InputStream in = sock.getInputStream();
out.write(1);
out.flush();
Assertions.assertEquals(1, in.read());
out.write(2);
out.flush();
Assertions.assertEquals(2, in.read());
}
} finally {
group.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testLateAutoRead() do?
testLateAutoRead() is a function in the netty codebase, defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringAutoReadTest.java.
Where is testLateAutoRead() defined?
testLateAutoRead() is defined in transport-native-io_uring/src/test/java/io/netty/channel/uring/IoUringAutoReadTest.java at line 43.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free