Class RecoveryConfig.Builder

java.lang.Object
io.github.mahmoudimus.quic.connection.RecoveryConfig.Builder
Enclosing class:
RecoveryConfig

public static final class RecoveryConfig.Builder extends Object
Builds a RecoveryConfig. Not thread-safe.
  • Method Details

    • packetThreshold

      public RecoveryConfig.Builder packetThreshold(int v)
      Sets the packet reordering threshold.
      Parameters:
      v - the threshold
      Returns:
      this builder
    • timeThreshold

      public RecoveryConfig.Builder timeThreshold(double v)
      Sets the time reordering threshold.
      Parameters:
      v - the RTT multiple
      Returns:
      this builder
    • initialRtt

      public RecoveryConfig.Builder initialRtt(long v)
      Sets the initial RTT.
      Parameters:
      v - nanoseconds
      Returns:
      this builder
    • persistentCongestionThreshold

      public RecoveryConfig.Builder persistentCongestionThreshold(int v)
      Sets the persistent congestion threshold.
      Parameters:
      v - PTOs
      Returns:
      this builder
    • initialMtu

      public RecoveryConfig.Builder initialMtu(int v)
      Sets the initial MTU.
      Parameters:
      v - bytes
      Returns:
      this builder
    • minMtu

      public RecoveryConfig.Builder minMtu(int v)
      Sets the minimum MTU.
      Parameters:
      v - bytes
      Returns:
      this builder
    • mtuDiscovery

      public RecoveryConfig.Builder mtuDiscovery(MtuDiscoveryConfig v)
      Sets MTU discovery.
      Parameters:
      v - the settings, or null to disable discovery
      Returns:
      this builder
    • congestionControllerFactory

      public RecoveryConfig.Builder congestionControllerFactory(ControllerFactory v)
      Sets the congestion controller.
      Parameters:
      v - the factory
      Returns:
      this builder
    • maxOutgoingBytesPerSecond

      public RecoveryConfig.Builder maxOutgoingBytesPerSecond(long v)
      Sets a pacing rate limit.
      Parameters:
      v - bytes per second, or -1 for none
      Returns:
      this builder
    • maxAckDelay

      public RecoveryConfig.Builder maxAckDelay(long v)
      Sets our max_ack_delay.
      Parameters:
      v - nanoseconds
      Returns:
      this builder
    • ackDelayExponent

      public RecoveryConfig.Builder ackDelayExponent(int v)
      Sets our ack_delay_exponent.
      Parameters:
      v - 0 to 20
      Returns:
      this builder
    • build

      public RecoveryConfig build()
      Builds the configuration.
      Returns:
      the configuration
      Throws:
      IllegalArgumentException - if a value is out of range