Class RecoveryConfig.Builder
java.lang.Object
io.github.mahmoudimus.quic.connection.RecoveryConfig.Builder
- Enclosing class:
RecoveryConfig
Builds a
RecoveryConfig. Not thread-safe.-
Method Summary
Modifier and TypeMethodDescriptionackDelayExponent(int v) Sets ourack_delay_exponent.build()Builds the configuration.Sets the congestion controller.initialMtu(int v) Sets the initial MTU.initialRtt(long v) Sets the initial RTT.maxAckDelay(long v) Sets ourmax_ack_delay.maxOutgoingBytesPerSecond(long v) Sets a pacing rate limit.minMtu(int v) Sets the minimum MTU.Sets MTU discovery.packetThreshold(int v) Sets the packet reordering threshold.Sets the persistent congestion threshold.timeThreshold(double v) Sets the time reordering threshold.
-
Method Details
-
packetThreshold
Sets the packet reordering threshold.- Parameters:
v- the threshold- Returns:
- this builder
-
timeThreshold
Sets the time reordering threshold.- Parameters:
v- the RTT multiple- Returns:
- this builder
-
initialRtt
Sets the initial RTT.- Parameters:
v- nanoseconds- Returns:
- this builder
-
persistentCongestionThreshold
Sets the persistent congestion threshold.- Parameters:
v- PTOs- Returns:
- this builder
-
initialMtu
Sets the initial MTU.- Parameters:
v- bytes- Returns:
- this builder
-
minMtu
Sets the minimum MTU.- Parameters:
v- bytes- Returns:
- this builder
-
mtuDiscovery
Sets MTU discovery.- Parameters:
v- the settings, or null to disable discovery- Returns:
- this builder
-
congestionControllerFactory
Sets the congestion controller.- Parameters:
v- the factory- Returns:
- this builder
-
maxOutgoingBytesPerSecond
Sets a pacing rate limit.- Parameters:
v- bytes per second, or -1 for none- Returns:
- this builder
-
maxAckDelay
Sets ourmax_ack_delay.- Parameters:
v- nanoseconds- Returns:
- this builder
-
ackDelayExponent
Sets ourack_delay_exponent.- Parameters:
v- 0 to 20- Returns:
- this builder
-
build
Builds the configuration.- Returns:
- the configuration
- Throws:
IllegalArgumentException- if a value is out of range
-