Home / Function/ initChannel() — netty Function Reference

initChannel() — netty Function Reference

Architecture documentation for the initChannel() function in WebSocketServerInitializer.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4d20e1b9_236d_40fa_13a4_5f78835b5ce4["initChannel()"]
  d91b1dd0_4fdc_4b4f_37dd_0c0e86c4c19a["WebSocketServerInitializer"]
  4d20e1b9_236d_40fa_13a4_5f78835b5ce4 -->|defined in| d91b1dd0_4fdc_4b4f_37dd_0c0e86c4c19a
  style 4d20e1b9_236d_40fa_13a4_5f78835b5ce4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

example/src/main/java/io/netty/example/http/websocketx/server/WebSocketServerInitializer.java lines 41–53

    @Override
    public void initChannel(SocketChannel ch) throws Exception {
        ChannelPipeline pipeline = ch.pipeline();
        if (sslCtx != null) {
            pipeline.addLast(sslCtx.newHandler(ch.alloc()));
        }
        pipeline.addLast(new HttpServerCodec());
        pipeline.addLast(new HttpObjectAggregator(MAX_CONTENT_LENGTH));
        pipeline.addLast(new WebSocketIndexPageHandler(WEBSOCKET_PATH));
        pipeline.addLast(new WebSocketServerCompressionHandler(MAX_CONTENT_LENGTH));
        pipeline.addLast(new WebSocketServerProtocolHandler(WEBSOCKET_PATH, null, true));
        pipeline.addLast(new WebSocketFrameHandler());
    }

Domain

Subdomains

Frequently Asked Questions

What does initChannel() do?
initChannel() is a function in the netty codebase, defined in example/src/main/java/io/netty/example/http/websocketx/server/WebSocketServerInitializer.java.
Where is initChannel() defined?
initChannel() is defined in example/src/main/java/io/netty/example/http/websocketx/server/WebSocketServerInitializer.java at line 41.

Analyze Your Own Codebase

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

Try Supermodel Free