testShutdownOutputAndClose() — netty Function Reference
Architecture documentation for the testShutdownOutputAndClose() function in NioSocketChannelTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD e17e2fb7_e8ab_64fd_3744_f6ddd86840d5["testShutdownOutputAndClose()"] 6562d13f_0b72_6889_33f9_c7688a2de3fc["NioSocketChannelTest"] e17e2fb7_e8ab_64fd_3744_f6ddd86840d5 -->|defined in| 6562d13f_0b72_6889_33f9_c7688a2de3fc style e17e2fb7_e8ab_64fd_3744_f6ddd86840d5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/socket/nio/NioSocketChannelTest.java lines 251–285
@Test
@Timeout(value = 3000, unit = TimeUnit.MILLISECONDS)
public void testShutdownOutputAndClose() throws IOException {
EventLoopGroup group = new MultiThreadIoEventLoopGroup(1, NioIoHandler.newFactory());
ServerSocket socket = new ServerSocket();
socket.bind(new InetSocketAddress(0));
Socket accepted = null;
try {
Bootstrap sb = new Bootstrap();
sb.group(group).channel(NioSocketChannel.class);
sb.handler(new ChannelInboundHandlerAdapter());
SocketChannel channel = (SocketChannel) sb.connect(socket.getLocalSocketAddress())
.syncUninterruptibly().channel();
accepted = socket.accept();
channel.shutdownOutput().syncUninterruptibly();
channel.close().syncUninterruptibly();
} finally {
if (accepted != null) {
try {
accepted.close();
} catch (IOException ignore) {
// ignore
}
}
try {
socket.close();
} catch (IOException ignore) {
// ignore
}
group.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does testShutdownOutputAndClose() do?
testShutdownOutputAndClose() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/socket/nio/NioSocketChannelTest.java.
Where is testShutdownOutputAndClose() defined?
testShutdownOutputAndClose() is defined in transport/src/test/java/io/netty/channel/socket/nio/NioSocketChannelTest.java at line 251.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free