Class Http2ServerConfig
java.lang.Object
io.vertx.core.http.Http2ServerConfig
HTTP/2 server configuration.
- Author:
- Julien Viet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanintsetConnectionWindowSize(int connectionWindowSize) Set the default HTTP/2 connection window size.setInitialSettings(Http2Settings settings) Set the HTTP/2 connection settings immediatly sent by the server when a client connects.setMaxSmallContinuationFrames(int maxSmallContinuationFrames) Set the maximum number of small continuation frames allowed, this is used to prevent flood DoS attack via zero-byte continuation frames.setMultiplexImplementation(boolean multiplexImplementation) Set which HTTP/2 implementation to usesetRstFloodMaxRstFramePerWindow(int rstFloodMaxRstFramePerWindow) Set the max number of RST frame allowed per time window, this is used to prevent HTTP/2 RST frame flood DDOS attacks.setRstFloodWindowDuration(Duration rstFloodWindowDuration) Set the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks.
-
Constructor Details
-
Http2ServerConfig
public Http2ServerConfig() -
Http2ServerConfig
-
-
Method Details
-
getRstFloodMaxRstFramePerWindow
public int getRstFloodMaxRstFramePerWindow()- Returns:
- the max number of RST frame allowed per time window
-
setRstFloodMaxRstFramePerWindow
Set the max number of RST frame allowed per time window, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value isHttpServerOptions.DEFAULT_HTTP2_RST_FLOOD_MAX_RST_FRAME_PER_WINDOW, setting zero or a negative value, disables flood protection.- Parameters:
rstFloodMaxRstFramePerWindow- the new maximum- Returns:
- a reference to this, so the API can be used fluently
-
getRstFloodWindowDuration
- Returns:
- the duration of the time window when checking the max number of RST frames.
-
setRstFloodWindowDuration
Set the duration of the time window when checking the max number of RST frames, this is used to prevent HTTP/2 RST frame flood DDOS attacks. The default value isHttpServerOptions.DEFAULT_HTTP2_RST_FLOOD_WINDOW_DURATION, setting zero or a negative value, disables flood protection.- Parameters:
rstFloodWindowDuration- the new duration- Returns:
- a reference to this, so the API can be used fluently
-
getMaxSmallContinuationFrames
public int getMaxSmallContinuationFrames()- Returns:
- the max number of small continuation frame allowed
-
setMaxSmallContinuationFrames
Set the maximum number of small continuation frames allowed, this is used to prevent flood DoS attack via zero-byte continuation frames. The default value isHttpServerOptions.DEFAULT_HTTP2_MAX_SMALL_CONTINUATION_FRAMES.- Parameters:
maxSmallContinuationFrames- the max number of small continuation frame allowed- Returns:
- a reference to this, so the API can be used fluently
-
getConnectionWindowSize
public int getConnectionWindowSize()- Returns:
- the default HTTP/2 connection window size
-
setConnectionWindowSize
Set the default HTTP/2 connection window size. It overrides the initial window size set byHttp2Settings.getInitialWindowSize(), so the connection window size is greater than for its streams, in order the data throughput. A value of-1reuses the initial window size setting.- Parameters:
connectionWindowSize- the window size applied to the connection- Returns:
- a reference to this, so the API can be used fluently
-
getMultiplexImplementation
public boolean getMultiplexImplementation()- Returns:
- whether to use the HTTP/2 implementation based on multiplexed channel
-
setMultiplexImplementation
Set which HTTP/2 implementation to use- Parameters:
multiplexImplementation- whether to use the HTTP/2 multiplex implementation- Returns:
- a reference to this, so the API can be used fluently
-
getInitialSettings
- Returns:
- the initial HTTP/2 connection settings
-
setInitialSettings
Set the HTTP/2 connection settings immediatly sent by the server when a client connects.- Parameters:
settings- the settings value- Returns:
- a reference to this, so the API can be used fluently
-