ChannelFuture() — netty Function Reference
Architecture documentation for the ChannelFuture() function in Http2MaxRstFrameLimitEncoder.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 5377e62a_6e94_1f44_1916_4aa3e2c8d5a3["ChannelFuture()"] 70483983_583b_a156_29a1_a1f5db1cbe8a["Http2MaxRstFrameLimitEncoder"] 5377e62a_6e94_1f44_1916_4aa3e2c8d5a3 -->|defined in| 70483983_583b_a156_29a1_a1f5db1cbe8a 980965b6_3c7a_be97_9097_595d39a50d76["countRstFrameErrorCode()"] 5377e62a_6e94_1f44_1916_4aa3e2c8d5a3 -->|calls| 980965b6_3c7a_be97_9097_595d39a50d76 style 5377e62a_6e94_1f44_1916_4aa3e2c8d5a3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameLimitEncoder.java lines 60–88
@Override
public ChannelFuture writeRstStream(ChannelHandlerContext ctx, int streamId, long errorCode,
ChannelPromise promise) {
ChannelFuture future = super.writeRstStream(ctx, streamId, errorCode, promise);
if (countRstFrameErrorCode(errorCode)) {
long currentNano = ticker.nanoTime();
if (currentNano - lastRstFrameNano >= nanosPerWindow) {
lastRstFrameNano = currentNano;
sendRstInWindow = 1;
} else {
sendRstInWindow++;
if (sendRstInWindow > maxRstFramesPerWindow) {
Http2Exception exception = Http2Exception.connectionError(Http2Error.ENHANCE_YOUR_CALM,
"Maximum number %d of RST frames frames reached within %d seconds", maxRstFramesPerWindow,
TimeUnit.NANOSECONDS.toSeconds(nanosPerWindow));
logger.debug("{} Maximum number {} of RST frames reached within {} seconds, " +
"closing connection with {} error", ctx.channel(), maxRstFramesPerWindow,
TimeUnit.NANOSECONDS.toSeconds(nanosPerWindow), exception.error(),
exception);
// First notify the Http2LifecycleManager and then close the connection.
lifecycleManager.onError(ctx, true, exception);
ctx.close();
}
}
}
return future;
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does ChannelFuture() do?
ChannelFuture() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameLimitEncoder.java.
Where is ChannelFuture() defined?
ChannelFuture() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameLimitEncoder.java at line 60.
What does ChannelFuture() call?
ChannelFuture() calls 1 function(s): countRstFrameErrorCode.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free