Home / Function/ main() — netty Function Reference

main() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f0844083_0e10_b779_63dc_5da830f2bc3c["main()"]
  60e55f08_52ed_e7b5_5a22_50c32d76c986["SocksServer"]
  f0844083_0e10_b779_63dc_5da830f2bc3c -->|defined in| 60e55f08_52ed_e7b5_5a22_50c32d76c986
  style f0844083_0e10_b779_63dc_5da830f2bc3c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/socksproxy/SocksServer.java lines 30–42

    public static void main(String[] args) throws Exception {
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        try {
            ServerBootstrap b = new ServerBootstrap();
            b.group(group)
             .channel(NioServerSocketChannel.class)
             .handler(new LoggingHandler(LogLevel.INFO))
             .childHandler(new SocksServerInitializer());
            b.bind(PORT).sync().channel().closeFuture().sync();
        } 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/socksproxy/SocksServer.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/socksproxy/SocksServer.java at line 30.

Analyze Your Own Codebase

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

Try Supermodel Free