Home / Function/ onRstStreamRead() — netty Function Reference

onRstStreamRead() — netty Function Reference

Architecture documentation for the onRstStreamRead() function in Http2MaxRstFrameListener.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  63209e61_b71d_9b11_0c5c_2b29862bcad3["onRstStreamRead()"]
  f6cc9826_c4b6_0da1_8bf8_712b2f00e3a1["Http2MaxRstFrameListener"]
  63209e61_b71d_9b11_0c5c_2b29862bcad3 -->|defined in| f6cc9826_c4b6_0da1_8bf8_712b2f00e3a1
  style 63209e61_b71d_9b11_0c5c_2b29862bcad3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameListener.java lines 42–59

    @Override
    public void onRstStreamRead(ChannelHandlerContext ctx, int streamId, long errorCode) throws Http2Exception {
        long currentNano = System.nanoTime();
        if (currentNano - lastRstFrameNano >= nanosPerWindow) {
            lastRstFrameNano = currentNano;
            receivedRstInWindow = 1;
        } else {
            receivedRstInWindow++;
            if (receivedRstInWindow > maxRstFramesPerWindow) {
                logger.debug("{} Maximum number {} of RST frames reached within {} seconds, " +
                                "closing connection with {} error", ctx.channel(), maxRstFramesPerWindow,
                        TimeUnit.NANOSECONDS.toSeconds(nanosPerWindow), RST_FRAME_RATE_EXCEEDED.error(),
                        RST_FRAME_RATE_EXCEEDED);
                throw RST_FRAME_RATE_EXCEEDED;
            }
        }
        super.onRstStreamRead(ctx, streamId, errorCode);
    }

Domain

Subdomains

Frequently Asked Questions

What does onRstStreamRead() do?
onRstStreamRead() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameListener.java.
Where is onRstStreamRead() defined?
onRstStreamRead() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2MaxRstFrameListener.java at line 42.

Analyze Your Own Codebase

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

Try Supermodel Free