Home / Function/ main() — netty Function Reference

main() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7be93842_d918_df8c_e12e_7d71c726999c["main()"]
  8ff14c5d_e4c4_8695_cf3b_38bfe48693b1["RxtxClient"]
  7be93842_d918_df8c_e12e_7d71c726999c -->|defined in| 8ff14c5d_e4c4_8695_cf3b_38bfe48693b1
  style 7be93842_d918_df8c_e12e_7d71c726999c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/rxtx/RxtxClient.java lines 36–60

    public static void main(String[] args) throws Exception {
        EventLoopGroup group = new OioEventLoopGroup();
        try {
            Bootstrap b = new Bootstrap();
            b.group(group)
             .channel(RxtxChannel.class)
             .handler(new ChannelInitializer<RxtxChannel>() {
                 @Override
                 public void initChannel(RxtxChannel ch) throws Exception {
                     ch.pipeline().addLast(
                         new LineBasedFrameDecoder(32768),
                         new StringEncoder(),
                         new StringDecoder(),
                         new RxtxClientHandler()
                     );
                 }
             });

            ChannelFuture f = b.connect(new RxtxDeviceAddress(PORT)).sync();

            f.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/rxtx/RxtxClient.java.
Where is main() defined?
main() is defined in example/src/main/java/io/netty/example/rxtx/RxtxClient.java at line 36.

Analyze Your Own Codebase

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

Try Supermodel Free