main() — netty Function Reference
Architecture documentation for the main() function in SctpEchoClient.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 0900e2dd_9e03_a2ae_def0_c650adf6ad0d["main()"] 15067895_0597_fe80_0b16_3084033dca03["SctpEchoClient"] 0900e2dd_9e03_a2ae_def0_c650adf6ad0d -->|defined in| 15067895_0597_fe80_0b16_3084033dca03 style 0900e2dd_9e03_a2ae_def0_c650adf6ad0d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/sctp/SctpEchoClient.java lines 42–68
public static void main(String[] args) throws Exception {
// Configure the client.
EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
try {
Bootstrap b = new Bootstrap();
b.group(group)
.channel(NioSctpChannel.class)
.option(SctpChannelOption.SCTP_NODELAY, true)
.handler(new ChannelInitializer<SctpChannel>() {
@Override
public void initChannel(SctpChannel ch) throws Exception {
ch.pipeline().addLast(
//new LoggingHandler(LogLevel.INFO),
new SctpEchoClientHandler());
}
});
// Start the client.
ChannelFuture f = b.connect(HOST, PORT).sync();
// Wait until the connection is closed.
f.channel().closeFuture().sync();
} finally {
// Shut down the event loop to terminate all threads.
group.shutdownGracefully();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does main() do?
main() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/sctp/SctpEchoClient.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/sctp/SctpEchoClient.java at line 42.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free