Class QuicClientConfig


@Unstable public class QuicClientConfig extends QuicEndpointConfig

Configuration of a Quic client.

The default transport configuration, allows the client to open bidi streams to a server with sensitive defaults values, it does not allow to open uni streams nor allows the server to open streams toward the client.

Author:
Julien Viet
  • Field Details

    • DEFAULT_CONNECT_TIMEOUT

      public static final Duration DEFAULT_CONNECT_TIMEOUT
      The default value of connect timeout = 60 seconds
    • DEFAULT_RECONNECT_ATTEMPTS

      public static final int DEFAULT_RECONNECT_ATTEMPTS
      The default value for reconnect attempts = 0
      See Also:
    • DEFAULT_RECONNECT_INTERVAL

      public static final Duration DEFAULT_RECONNECT_INTERVAL
      The default value for reconnect interval = 1000 ms
  • Constructor Details

    • QuicClientConfig

      public QuicClientConfig()
    • QuicClientConfig

      public QuicClientConfig(QuicClientConfig other)
  • Method Details

    • setTransportConfig

      public QuicClientConfig setTransportConfig(QuicConfig transportConfig)
      Overrides:
      setTransportConfig in class QuicEndpointConfig
    • setQLogConfig

      public QuicClientConfig setQLogConfig(QLogConfig qLogConfig)
      Description copied from class: QuicEndpointConfig

      Set the endpoint QLog config.

      The config can point to a single file or to a directory where qlog files will be created.

      Overrides:
      setQLogConfig in class QuicEndpointConfig
      Parameters:
      qLogConfig - the qlog config
      Returns:
      this exact object instance
    • setKeyLogFile

      public QuicClientConfig setKeyLogFile(String keyLogFile)
      Description copied from class: QuicEndpointConfig

      Configures the endpoint to dump the cryptographic secrets using in TLS in the SSLKEYLOGFILE format.

      The file might exist or will be created (in which case the parent file must exist), content will be appended to the file.

      This should be used only for debugging purpose and must not be used in production. This feature is disabled by default.

      Overrides:
      setKeyLogFile in class QuicEndpointConfig
      Parameters:
      keyLogFile - the path to the key log file
      Returns:
      this exact object instance
    • setIdleTimeout

      public QuicClientConfig setIdleTimeout(Duration idleTimeout)
      Description copied from class: EndpointConfig
      Set the stream idle timeout, zero or null means don't time out. This determines if a stream will timeout and be closed if no data is received nor sent within the timeout.
      Overrides:
      setIdleTimeout in class QuicEndpointConfig
      Parameters:
      idleTimeout - the idle timeout
      Returns:
      a reference to this, so the API can be used fluently
    • setReadIdleTimeout

      public QuicClientConfig setReadIdleTimeout(Duration idleTimeout)
      Description copied from class: EndpointConfig

      Set the stream read idle timeout, zero or null means or null means don't time out. This determines if a stream will timeout and be closed if no data is received within the timeout.

      Overrides:
      setReadIdleTimeout in class QuicEndpointConfig
      Parameters:
      idleTimeout - the read idle timeout
      Returns:
      a reference to this, so the API can be used fluently
    • setWriteIdleTimeout

      public QuicClientConfig setWriteIdleTimeout(Duration idleTimeout)
      Description copied from class: EndpointConfig

      Set the stream write idle timeout, zero or null means don't time out. This determines if a stream will timeout and be closed if no data is sent within the timeout.

      Overrides:
      setWriteIdleTimeout in class QuicEndpointConfig
      Parameters:
      idleTimeout - the write idle timeout
      Returns:
      a reference to this, so the API can be used fluently
    • setMetricsName

      public QuicClientConfig setMetricsName(String metricsName)
      Description copied from class: EndpointConfig
      Set the metrics name identifying the reported metrics, useful for grouping metrics with the same name.
      Overrides:
      setMetricsName in class QuicEndpointConfig
      Parameters:
      metricsName - the metrics name
      Returns:
      a reference to this, so the API can be used fluently
    • setMaxStreamBidiRequests

      public QuicClientConfig setMaxStreamBidiRequests(int maxStreamRequests)
      Description copied from class: QuicEndpointConfig
      Set the maximum number of bidi stream requests per connection that can be queued when the connection stream bidi limit is reached.
      Overrides:
      setMaxStreamBidiRequests in class QuicEndpointConfig
      Parameters:
      maxStreamRequests - the maximum value
    • setMaxStreamUniRequests

      public QuicClientConfig setMaxStreamUniRequests(int maxStreamRequests)
      Description copied from class: QuicEndpointConfig
      Set the maximum number of unit stream requests per connection that can be queued when the connection stream uni limit is reached.
      Overrides:
      setMaxStreamUniRequests in class QuicEndpointConfig
      Parameters:
      maxStreamRequests - the maximum value
    • setLogConfig

      public QuicClientConfig setLogConfig(LogConfig config)
      Description copied from class: EndpointConfig
      Configure the log config: Netty's stream pipeline is configured for logging on Netty's logger.
      Overrides:
      setLogConfig in class QuicEndpointConfig
      Parameters:
      config - the log config
      Returns:
      a reference to this, so the API can be used fluently
    • setReuseAddress

      public QuicServerConfig setReuseAddress(boolean reuseAddress)
      Description copied from class: QuicEndpointConfig
      Set the value of reuse address, used to bind the UDP socket underpinning the QUIC transport.
      Overrides:
      setReuseAddress in class QuicEndpointConfig
      Parameters:
      reuseAddress - the value of reuse address
      Returns:
      a reference to this, so the API can be used fluently
    • getConnectTimeout

      public Duration getConnectTimeout()
      Returns:
      the value of connect timeout
    • setConnectTimeout

      public QuicClientConfig setConnectTimeout(Duration connectTimeout)
      Set the connect timeout.
      Parameters:
      connectTimeout - connect timeout
      Returns:
      a reference to this, so the API can be used fluently
    • getLocalAddress

      public SocketAddress getLocalAddress()
      Returns:
      the local address to bind for network connections.
    • setLocalAddress

      public QuicClientConfig setLocalAddress(SocketAddress localAddress)
      Set the local address to bind for network connections. When the local address is null, it will pick any local address, the default local address is null.
      Parameters:
      localAddress - the local address
      Returns:
      a reference to this, so the API can be used fluently
    • getReconnectAttempts

      public int getReconnectAttempts()
      Returns:
      the value of reconnect attempts
    • setReconnectAttempts

      public QuicClientConfig setReconnectAttempts(int attempts)
      Set the value of reconnect attempts
      Parameters:
      attempts - the maximum number of reconnect attempts
      Returns:
      a reference to this, so the API can be used fluently
    • getReconnectInterval

      public Duration getReconnectInterval()
      Returns:
      the value of reconnect interval
    • setReconnectInterval

      public QuicClientConfig setReconnectInterval(Duration interval)
      Set the reconnect interval
      Parameters:
      interval - the reconnect interval
      Returns:
      a reference to this, so the API can be used fluently