Class Http2MaxRstFrameLimitEncoder

All Implemented Interfaces:
Http2ConnectionEncoder, Http2DataWriter, Http2FrameWriter, Http2SettingsReceivedConsumer, Closeable, AutoCloseable

final class Http2MaxRstFrameLimitEncoder extends DecoratingHttp2ConnectionEncoder
DecoratingHttp2ConnectionEncoder which guards against a remote peer that will trigger a massive amount of RST frames on an existing connection. This encoder will tear-down the connection once we reached the configured limit to reduce the risk of DDOS.
  • Field Details

    • logger

      private static final InternalLogger logger
    • nanosPerWindow

      private final long nanosPerWindow
    • maxRstFramesPerWindow

      private final int maxRstFramesPerWindow
    • ticker

      private final Ticker ticker
    • lastRstFrameNano

      private long lastRstFrameNano
    • sendRstInWindow

      private int sendRstInWindow
    • lifecycleManager

      private Http2LifecycleManager lifecycleManager
  • Constructor Details

    • Http2MaxRstFrameLimitEncoder

      Http2MaxRstFrameLimitEncoder(Http2ConnectionEncoder delegate, int maxRstFramesPerWindow, int secondsPerWindow)
    • Http2MaxRstFrameLimitEncoder

      Http2MaxRstFrameLimitEncoder(Http2ConnectionEncoder delegate, int maxRstFramesPerWindow, int secondsPerWindow, Ticker ticker)
  • Method Details