decode() — netty Function Reference
Architecture documentation for the decode() function in WebSocketServerProtocolHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD ca63dc9d_3136_91f5_fca2_402a15bd197d["decode()"] 24d9f96e_3f70_9b0f_3941_7e5455fcbe3b["WebSocketServerProtocolHandler"] ca63dc9d_3136_91f5_fca2_402a15bd197d -->|defined in| 24d9f96e_3f70_9b0f_3941_7e5455fcbe3b style ca63dc9d_3136_91f5_fca2_402a15bd197d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java lines 235–250
@Override
protected void decode(ChannelHandlerContext ctx, WebSocketFrame frame, List<Object> out) throws Exception {
if (serverConfig.handleCloseFrames() && frame instanceof CloseWebSocketFrame) {
WebSocketServerHandshaker handshaker = getHandshaker(ctx.channel());
if (handshaker != null) {
frame.retain();
ChannelPromise promise = ctx.newPromise();
closeSent(promise);
handshaker.close(ctx, (CloseWebSocketFrame) frame, promise);
} else {
ctx.writeAndFlush(Unpooled.EMPTY_BUFFER).addListener(ChannelFutureListener.CLOSE);
}
return;
}
super.decode(ctx, frame, out);
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does decode() do?
decode() is a function in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java.
Where is decode() defined?
decode() is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerProtocolHandler.java at line 235.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free