close() — netty Function Reference
Architecture documentation for the close() function in LocalTransportThreadModelTest2.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD babd54f5_2738_3d21_8934_12868f2e6b96["close()"] 466017c7_8ea0_bf8a_7ded_086ed4918c64["LocalTransportThreadModelTest2"] babd54f5_2738_3d21_8934_12868f2e6b96 -->|defined in| 466017c7_8ea0_bf8a_7ded_086ed4918c64 48439426_aca2_f365_76b8_0bb2924f04f9["testSocketReuse()"] 48439426_aca2_f365_76b8_0bb2924f04f9 -->|calls| babd54f5_2738_3d21_8934_12868f2e6b96 style babd54f5_2738_3d21_8934_12868f2e6b96 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest2.java lines 78–99
public void close(final Channel localChannel, final LocalHandler localRegistrationHandler) {
// we want to make sure we actually shutdown IN the event loop
if (localChannel.eventLoop().inEventLoop()) {
// Wait until all messages are flushed before closing the channel.
if (localRegistrationHandler.lastWriteFuture != null) {
localRegistrationHandler.lastWriteFuture.awaitUninterruptibly();
}
localChannel.close();
return;
}
localChannel.eventLoop().execute(new Runnable() {
@Override
public void run() {
close(localChannel, localRegistrationHandler);
}
});
// Wait until the connection is closed or the connection attempt fails.
localChannel.closeFuture().awaitUninterruptibly();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does close() do?
close() is a function in the netty codebase, defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest2.java.
Where is close() defined?
close() is defined in transport/src/test/java/io/netty/channel/local/LocalTransportThreadModelTest2.java at line 78.
What calls close()?
close() is called by 1 function(s): testSocketReuse.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free