channelRead() — netty Function Reference
Architecture documentation for the channelRead() function in WebSocketClientProtocolHandshakeHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 16cdeb07_0fb1_8497_1f32_a2b6b92effe8["channelRead()"] 825155a9_3784_59cc_4b68_f6750284e255["WebSocketClientProtocolHandshakeHandler"] 16cdeb07_0fb1_8497_1f32_a2b6b92effe8 -->|defined in| 825155a9_3784_59cc_4b68_f6750284e255 style 16cdeb07_0fb1_8497_1f32_a2b6b92effe8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java lines 78–99
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
if (!(msg instanceof FullHttpResponse)) {
ctx.fireChannelRead(msg);
return;
}
FullHttpResponse response = (FullHttpResponse) msg;
try {
if (!handshaker.isHandshakeComplete()) {
handshaker.finishHandshake(ctx.channel(), response);
handshakePromise.trySuccess();
ctx.fireUserEventTriggered(
WebSocketClientProtocolHandler.ClientHandshakeStateEvent.HANDSHAKE_COMPLETE);
ctx.pipeline().remove(this);
return;
}
throw new IllegalStateException("WebSocketClientHandshaker should have been non finished yet");
} finally {
response.release();
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does channelRead() do?
channelRead() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java.
Where is channelRead() defined?
channelRead() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientProtocolHandshakeHandler.java at line 78.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free