Class QuicConfig
- Author:
- Julien Viet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final booleanstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final QuicCongestionControlAlgorithmstatic final booleanstatic final booleanstatic final booleanstatic final intstatic final Durationstatic final Durationstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final booleanstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected QuicConfigcopy()static QuicConfigstatic QuicConfigintbooleanbooleanbooleanintlonglonglonglonglonglongsetAckDelayExponent(int ackDelayExponent) Sets theackDelayExponenttransport parameter.setCongestionControlAlgorithm(QuicCongestionControlAlgorithm congestionControlAlgorithm) Sets the congestion control algorithm used.setDatagramConfig(QuicDatagramConfig datagramConfig) Set the configuration of the datagram extension.setDisableActiveMigration(boolean disableActiveMigration) Set whether to allow active migration.setGrease(boolean grease) Configures whether to send GREASE values.setHystart(boolean hystart) Configures whether to enable HyStart++.setInitialCongestionWindowPackets(int initialCongestionWindowPackets) Sets initial congestion window size in terms of packet count.setInitialMaxData(long initialMaxData) Set theinitialMaxDatatransport parameter.setInitialMaxStreamDataBidiLocal(long initialMaxStreamDataBidiLocal) Set theinitialMaxStreamDataBidiLocaltransport parameter.setInitialMaxStreamDataBidiRemote(long initialMaxStreamDataBidiRemote) Set theinitialMaxStreamDataBidiRemotetransport parameter.setInitialMaxStreamDataUni(long initialMaxStreamDataUni) Sets theinitialMaxStreamDataUnitransport parameter.setInitialMaxStreamsBidi(long initialMaxStreamsBidi) Set thesetInitialMaxStreamsBiditransport parameter.setInitialMaxStreamsUni(long initialMaxStreamsUni) Sets theinitialMaxStreamsUnitransport parameter.setMaxAckDelay(Duration maxAckDelay) Sets themaxAckDelaytransport parameter.setMaxIdleTimeout(Duration maxIdleTimeout) Sets themaxIdleTimeouttransport parameter.
-
Field Details
-
DEFAULT_MAX_INITIAL_DATA
public static final long DEFAULT_MAX_INITIAL_DATA- See Also:
-
DEFAULT_MAX_STREAM_DATA_BIDI_LOCAL
public static final long DEFAULT_MAX_STREAM_DATA_BIDI_LOCAL- See Also:
-
DEFAULT_MAX_STREAM_DATA_BIDI_REMOTE
public static final long DEFAULT_MAX_STREAM_DATA_BIDI_REMOTE- See Also:
-
DEFAULT_MAX_STREAMS_DATA_UNI
public static final long DEFAULT_MAX_STREAMS_DATA_UNI- See Also:
-
DEFAULT_MAX_STREAMS_DATA_BIDI
public static final long DEFAULT_MAX_STREAMS_DATA_BIDI- See Also:
-
DEFAULT_MAX_STREAM_DATA_UNI
public static final long DEFAULT_MAX_STREAM_DATA_UNI- See Also:
-
DEFAULT_DISABLE_ACTIVE_MIGRATION
public static final boolean DEFAULT_DISABLE_ACTIVE_MIGRATION- See Also:
-
DEFAULT_CLIENT_MAX_INITIAL_DATA
public static final long DEFAULT_CLIENT_MAX_INITIAL_DATA- See Also:
-
DEFAULT_CLIENT_MAX_STREAM_DATA_BIDI_LOCAL
public static final long DEFAULT_CLIENT_MAX_STREAM_DATA_BIDI_LOCAL- See Also:
-
DEFAULT_CLIENT_MAX_STREAM_DATA_BIDI_REMOTE
public static final long DEFAULT_CLIENT_MAX_STREAM_DATA_BIDI_REMOTE- See Also:
-
DEFAULT_CLIENT_MAX_STREAMS_DATA_UNI
public static final long DEFAULT_CLIENT_MAX_STREAMS_DATA_UNI- See Also:
-
DEFAULT_CLIENT_MAX_STREAMS_DATA_BIDI
public static final long DEFAULT_CLIENT_MAX_STREAMS_DATA_BIDI- See Also:
-
DEFAULT_CLIENT_MAX_STREAM_DATA_UNI
public static final long DEFAULT_CLIENT_MAX_STREAM_DATA_UNI- See Also:
-
DEFAULT_CLIENT_DISABLE_ACTIVE_MIGRATION
public static final boolean DEFAULT_CLIENT_DISABLE_ACTIVE_MIGRATION- See Also:
-
DEFAULT_SERVER_MAX_INITIAL_DATA
public static final long DEFAULT_SERVER_MAX_INITIAL_DATA- See Also:
-
DEFAULT_SERVER_MAX_STREAM_DATA_BIDI_LOCAL
public static final long DEFAULT_SERVER_MAX_STREAM_DATA_BIDI_LOCAL- See Also:
-
DEFAULT_SERVER_MAX_STREAM_DATA_BIDI_REMOTE
public static final long DEFAULT_SERVER_MAX_STREAM_DATA_BIDI_REMOTE- See Also:
-
DEFAULT_SERVER_MAX_STREAMS_DATA_UNI
public static final long DEFAULT_SERVER_MAX_STREAMS_DATA_UNI- See Also:
-
DEFAULT_SERVER_MAX_STREAMS_DATA_BIDI
public static final long DEFAULT_SERVER_MAX_STREAMS_DATA_BIDI- See Also:
-
DEFAULT_SERVER_MAX_STREAM_DATA_UNI
public static final long DEFAULT_SERVER_MAX_STREAM_DATA_UNI- See Also:
-
DEFAULT_SERVER_DISABLE_ACTIVE_MIGRATION
public static final boolean DEFAULT_SERVER_DISABLE_ACTIVE_MIGRATION- See Also:
-
DEFAULT_MAX_IDLE_TIMEOUT
-
DEFAULT_MAX_ACK_DELAY
-
DEFAULT_ACK_DELAY_EXPONENT
public static final int DEFAULT_ACK_DELAY_EXPONENT- See Also:
-
DEFAULT_CONGESTION_CONTROL_ALGORITHM
-
DEFAULT_GREASE
public static final boolean DEFAULT_GREASE- See Also:
-
DEFAULT_HYSTART
public static final boolean DEFAULT_HYSTART- See Also:
-
DEFAULT_INITIAL_CONGESTION_WINDOW_PACKETS
public static final int DEFAULT_INITIAL_CONGESTION_WINDOW_PACKETS- See Also:
-
-
Constructor Details
-
QuicConfig
public QuicConfig() -
QuicConfig
-
-
Method Details
-
copy
- Specified by:
copyin classTransportConfig
-
getInitialMaxData
public long getInitialMaxData()- Returns:
- the
initialMaxDataparameter value - See Also:
-
setInitialMaxData
Set the
initialMaxDatatransport parameter.When set to a non-zero value, it will only allow at most
initialMaxDatabytes of incoming stream data to be buffered for the whole connection (that is, data that is not yet read by the application) and will allow more data to be received as the buffer is consumed by the application.- Parameters:
initialMaxData- the value to set- Returns:
- this instance
-
getInitialMaxStreamDataBidiLocal
public long getInitialMaxStreamDataBidiLocal()- Returns:
- the
initialMaxStreamDataBidiLocalparameter value - See Also:
-
setInitialMaxStreamDataBidiLocal
Set the
initialMaxStreamDataBidiLocaltransport parameter.When set to a non-zero value it will only allow at most
initialMaxStreamDataBidiLocalbytes of incoming stream data to be buffered for each locally-initiated bidirectional stream (that is, data that is not yet read by the application) and will allow more data to be received as the buffer is consumed by the application.- Parameters:
initialMaxStreamDataBidiLocal- the value to set- Returns:
- this instance
-
getInitialMaxStreamDataBidiRemote
public long getInitialMaxStreamDataBidiRemote()- Returns:
- the
initialMaxStreamDataBidiRemoteparameter value - See Also:
-
setInitialMaxStreamDataBidiRemote
Set the
initialMaxStreamDataBidiRemotetransport parameter.When set to a non-zero value it will only allow at most
initialMaxStreamDataBidiRemotebytes of incoming stream data to be buffered for each remotely-initiated bidirectional stream (that is, data that is not yet read by the application) and will allow more data to be received as the buffer is consumed by the application.- Parameters:
initialMaxStreamDataBidiRemote- the value to set- Returns:
- this instance
-
getInitialMaxStreamsBidi
public long getInitialMaxStreamsBidi()- Returns:
- the
initialMaxStreamsBidiparameter value - See Also:
-
setInitialMaxStreamsBidi
Set the
setInitialMaxStreamsBiditransport parameter.When set to a non-zero value it will only allow
initialMaxStreamsBidinumber of concurrent remotely-initiated bidirectional streams to be open at any given time and will increase the limit automatically as streams are completed.A bidirectional stream is considered completed when all incoming data has been read by the application (up to the fin offset) or the stream's read direction has been shutdown, and all outgoing data has been acked by the peer (up to the fin offset) or the stream's write direction has been shutdown.
- Parameters:
initialMaxStreamsBidi- the value to set- Returns:
- this instance
-
getInitialMaxStreamsUni
public long getInitialMaxStreamsUni()- Returns:
- the
initialMaxStreamsUniparameter value - See Also:
-
setInitialMaxStreamsUni
Sets the
initialMaxStreamsUnitransport parameter.When set to a non-zero value it will only allow
initialMaxStreamsUninumber of concurrent remotely-initiated unidirectional streams to be open at any given time and will increase the limit automatically as streams are completed.A unidirectional stream is considered completed when all incoming data has been read by the application (up to the fin offset) or the stream's read direction has been shutdown.
- Parameters:
initialMaxStreamsUni- the value to set- Returns:
- this instance
-
getInitialMaxStreamDataUni
public long getInitialMaxStreamDataUni()- Returns:
- the
initialMaxStreamDataUniparameter value - See Also:
-
setInitialMaxStreamDataUni
Sets the
initialMaxStreamDataUnitransport parameter.When set to a non-zero value it will only allow at most
initialMaxStreamDataUnibytes of incoming stream data to be buffered for each unidirectional stream (that is, data that is not yet read by the application) and will allow more data to be received as the buffer is consumed by the application.- Parameters:
initialMaxStreamDataUni- the value to set- Returns:
- this instance
-
getDisableActiveMigration
public boolean getDisableActiveMigration()- Returns:
- the
activeMigrationparameter value - See Also:
-
setDisableActiveMigration
Set whether to allow active migration.
- Parameters:
disableActiveMigration- the value to set- Returns:
- this instance
-
getMaxIdleTimeout
- Returns:
- the
maxIdleTimeoutparameter value - See Also:
-
setMaxIdleTimeout
Sets the
maxIdleTimeouttransport parameter.The default value is
40seconds.- Parameters:
maxIdleTimeout- the value to set- Returns:
- this instance
-
getDatagramConfig
- Returns:
- the datagram extension config
-
setDatagramConfig
Set the configuration of the datagram extension.- Parameters:
datagramConfig- the configuration of the- Returns:
- this instance
-
getMaxAckDelay
- Returns:
- the
maxAckDelayparameter value - See Also:
-
setMaxAckDelay
Sets the
maxAckDelaytransport parameter.The default value is
25(milliseconds).- Parameters:
maxAckDelay- the value to set- Returns:
- this instance
-
getAckDelayExponent
public int getAckDelayExponent()- Returns:
- the
ackDelayExponentparameter value - See Also:
-
setAckDelayExponent
Sets the
ackDelayExponenttransport parameter.The default value is
3.- Parameters:
ackDelayExponent- the value to set- Returns:
- this instance
-
getCongestionControlAlgorithm
- Returns:
- the
congestionControlAlgorithmparameter value - See Also:
-
setCongestionControlAlgorithm
public QuicConfig setCongestionControlAlgorithm(QuicCongestionControlAlgorithm congestionControlAlgorithm) Sets the congestion control algorithm used.
The default value is
QuicCongestionControlAlgorithm.CUBIC.- Parameters:
congestionControlAlgorithm- the congestion control algorithm to use- Returns:
- this instance
-
getGrease
public boolean getGrease()- Returns:
- whether to send GREASE values
- See Also:
-
setGrease
Configures whether to send GREASE values.
The default value is
true- Parameters:
grease- whether to send GREASE values.- Returns:
- this instance
-
getHystart
public boolean getHystart()- Returns:
- whether to enable HyStart++
- See Also:
-
setHystart
Configures whether to enable HyStart++.
The default value is
true.- Parameters:
hystart- whether to enable HyStart++.- Returns:
- this instance
-
getInitialCongestionWindowPackets
public int getInitialCongestionWindowPackets()- Returns:
- the initial congestion window size in terms of packet count
- See Also:
-
setInitialCongestionWindowPackets
Sets initial congestion window size in terms of packet count.
The default value is
10.- Parameters:
initialCongestionWindowPackets- the value to set- Returns:
- this instance
-
forClient
- Returns:
- a sensitive default client configuration
-
forServer
- Returns:
- a sensitive default server configuration
-