Home / Function/ main() — netty Function Reference

main() — netty Function Reference

Architecture documentation for the main() function in QuoteOfTheMomentServer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ea22931a_3f52_067d_719c_d69ad7414c45["main()"]
  821a9668_0c60_2163_6a42_9cc8216581d7["QuoteOfTheMomentServer"]
  ea22931a_3f52_067d_719c_d69ad7414c45 -->|defined in| 821a9668_0c60_2163_6a42_9cc8216581d7
  style ea22931a_3f52_067d_719c_d69ad7414c45 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/qotm/QuoteOfTheMomentServer.java lines 35–48

    public static void main(String[] args) throws Exception {
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            Bootstrap b = new Bootstrap();
            b.group(group)
             .channel(NioDatagramChannel.class)
             .option(ChannelOption.SO_BROADCAST, true)
             .handler(new QuoteOfTheMomentServerHandler());

            b.bind(PORT).sync().channel().closeFuture().await();
        } finally {
            group.shutdownGracefully();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does main() do?
main() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/qotm/QuoteOfTheMomentServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/qotm/QuoteOfTheMomentServer.java at line 35.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free