Home / Class/ SctpEchoServer Class — netty Architecture

SctpEchoServer Class — netty Architecture

Architecture documentation for the SctpEchoServer class in SctpEchoServer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a0d46673_bea7_5122_828a_1fd89864fe45["SctpEchoServer"]
  2295da9a_5f30_4e8b_dd6b_b8e93bbf22a0["SctpEchoServer.java"]
  a0d46673_bea7_5122_828a_1fd89864fe45 -->|defined in| 2295da9a_5f30_4e8b_dd6b_b8e93bbf22a0
  4fbb0d63_5455_558f_663d_d92f4e1cc7f5["main()"]
  a0d46673_bea7_5122_828a_1fd89864fe45 -->|method| 4fbb0d63_5455_558f_663d_d92f4e1cc7f5

Relationship Graph

Source Code

example/src/main/java/io/netty/example/sctp/SctpEchoServer.java lines 33–66

public final class SctpEchoServer {

    static final int PORT = Integer.parseInt(System.getProperty("port", "8007"));

    public static void main(String[] args) throws Exception {
        // Configure the server.
        EventLoopGroup group = new MultiThreadIoEventLoopGroup(NioIoHandler.newFactory());
        final SctpEchoServerHandler serverHandler = new SctpEchoServerHandler();
        try {
            ServerBootstrap b = new ServerBootstrap();
            b.group(group)
             .channel(NioSctpServerChannel.class)
             .option(ChannelOption.SO_BACKLOG, 100)
             .handler(new LoggingHandler(LogLevel.INFO))
             .childHandler(new ChannelInitializer<SctpChannel>() {
                 @Override
                 public void initChannel(SctpChannel ch) throws Exception {
                     ch.pipeline().addLast(
                             //new LoggingHandler(LogLevel.INFO),
                             serverHandler);
                 }
             });

            // Start the server.
            ChannelFuture f = b.bind(PORT).sync();

            // Wait until the server socket is closed.
            f.channel().closeFuture().sync();
        } finally {
            // Shut down all event loops to terminate all threads.
            group.shutdownGracefully();
        }
    }
}

Frequently Asked Questions

What is the SctpEchoServer class?
SctpEchoServer is a class in the netty codebase, defined in example/src/main/java/io/netty/example/sctp/SctpEchoServer.java.
Where is SctpEchoServer defined?
SctpEchoServer is defined in example/src/main/java/io/netty/example/sctp/SctpEchoServer.java at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free