main() — netty Function Reference
Architecture documentation for the main() function in SecureChatServer.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 4497be36_4452_ed44_9c8e_fb9856d3bad9["main()"] b712c202_e549_faea_290d_9e4da7a02431["SecureChatServer"] 4497be36_4452_ed44_9c8e_fb9856d3bad9 -->|defined in| b712c202_e549_faea_290d_9e4da7a02431 style 4497be36_4452_ed44_9c8e_fb9856d3bad9 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
example/src/main/java/io/netty/example/securechat/SecureChatServer.java lines 38–58
public static void main(String[] args) throws Exception {
X509Bundle ssc = new CertificateBuilder()
.subject("cn=localhost")
.setIsCertificateAuthority(true)
.buildSelfSigned();
SslContext sslCtx = SslContextBuilder.forServer(ssc.toKeyManagerFactory())
.build();
EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
try {
ServerBootstrap b = new ServerBootstrap();
b.group(group)
.channel(NioServerSocketChannel.class)
.handler(new LoggingHandler(LogLevel.INFO))
.childHandler(new SecureChatServerInitializer(sslCtx));
b.bind(PORT).sync().channel().closeFuture().sync();
} finally {
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/securechat/SecureChatServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/securechat/SecureChatServer.java at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free