Home / Function/ channelRead0() — netty Function Reference

channelRead0() — netty Function Reference

Architecture documentation for the channelRead0() function in ProxyServer.java from the netty codebase.

Function java Buffer Allocators calls 5 called by 1

Entity Profile

Dependency Diagram

graph TD
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8["channelRead0()"]
  2b6c4159_d6d3_1ea1_7d2a_b3ecbc771341["IntermediaryHandler"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|defined in| 2b6c4159_d6d3_1ea1_7d2a_b3ecbc771341
  d35cb1df_dc40_6945_08a5_a25b55513228["channelRead0()"]
  d35cb1df_dc40_6945_08a5_a25b55513228 -->|calls| c4b3f8a3_81ad_bb3f_ed26_42280222f3f8
  d35cb1df_dc40_6945_08a5_a25b55513228["channelRead0()"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|calls| d35cb1df_dc40_6945_08a5_a25b55513228
  a9f2f8a5_cde6_ed4b_c0f0_4f3ecb59b774["flush()"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|calls| a9f2f8a5_cde6_ed4b_c0f0_4f3ecb59b774
  a4ee6e56_0ea3_0bab_f589_97c4f1f0ac3f["BackendHandler()"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|calls| a4ee6e56_0ea3_0bab_f589_97c4f1f0ac3f
  062e6ca1_88ba_0b80_9896_af72582faf86["recordException()"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|calls| 062e6ca1_88ba_0b80_9896_af72582faf86
  184b2fe6_cb56_df45_eecf_a591387f9a36["handleProxyProtocol()"]
  c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 -->|calls| 184b2fe6_cb56_df45_eecf_a591387f9a36
  style c4b3f8a3_81ad_bb3f_ed26_42280222f3f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

handler-proxy/src/test/java/io/netty/handler/proxy/ProxyServer.java lines 160–182

        @Override
        protected final void channelRead0(final ChannelHandlerContext ctx, Object msg) throws Exception {
            if (finished) {
                received.add(ReferenceCountUtil.retain(msg));
                flush();
                return;
            }

            boolean finished = handleProxyProtocol(ctx, msg);
            if (finished) {
                this.finished = true;
                ChannelFuture f = connectToDestination(ctx.channel().eventLoop(), new BackendHandler(ctx));
                f.addListener((ChannelFutureListener) future -> {
                    if (!future.isSuccess()) {
                        recordException(future.cause());
                        ctx.close();
                    } else {
                        backend = future.channel();
                        flush();
                    }
                });
            }
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does channelRead0() do?
channelRead0() is a function in the netty codebase, defined in handler-proxy/src/test/java/io/netty/handler/proxy/ProxyServer.java.
Where is channelRead0() defined?
channelRead0() is defined in handler-proxy/src/test/java/io/netty/handler/proxy/ProxyServer.java at line 160.
What does channelRead0() call?
channelRead0() calls 5 function(s): BackendHandler, channelRead0, flush, handleProxyProtocol, recordException.
What calls channelRead0()?
channelRead0() is called by 1 function(s): channelRead0.

Analyze Your Own Codebase

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

Try Supermodel Free