| java.lang.Object | |
| ↳ | org.chromium.net.QuicOptions.Builder |
Builder for QuicOptions.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a host to the QUIC allowlist.
| |||||||||||
Adds a QUIC tag to send in a QUIC handshake's connection options that only affects
the client.
| |||||||||||
Adds a QUIC tag to send in a QUIC handshake's connection options.
| |||||||||||
Adds a QUIC version to the list of QUIC versions to enable.
| |||||||||||
Sets an arbitrary QUICHE flag.
| |||||||||||
Creates and returns the final
QuicOptions instance, based on the values
in this builder. | |||||||||||
Sets whether QUIC sessions should be closed on IP address change.
| |||||||||||
Sets whether Cronet should wait for the primary path (usually QUIC) to be ready even if
there's a secondary path of reaching the server (SPDY / HTTP2) which is ready
immediately.
| |||||||||||
Sets whether TLS with 0-RTT should be enabled.
| |||||||||||
Sets whether QUIC sessions should be goaway'd on IP address change.
| |||||||||||
Sets whether the broken server period should scale exponentially.
| |||||||||||
Sets whether requests that failed with a QUIC protocol errors should be retried without
using any
alt-svc servers. | |||||||||||
Sets the timeout for a connection SSL handshake.
| |||||||||||
Sets the user agent to be used outside of HTTP requests (for example for QUIC
handshakes).
| |||||||||||
Sets the maximum idle time for a connection.
| |||||||||||
Sets how many server configurations (metadata like list of alt svc, whether QUIC is
supported, etc.) should be held in memory.
| |||||||||||
Sets the initial for which Cronet shouldn't attempt to use QUIC for a given server after
the server's QUIC support turned out to be broken.
| |||||||||||
Sets the maximum idle time for a connection which hasn't completed a SSL handshake yet.
| |||||||||||
Sets the maximum desired time between packets on wire.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
Adds a host to the QUIC allowlist.
If no hosts are specified, the per-host allowlist functionality is disabled. Otherwise, Cronet will only use QUIC when talking to hosts on the allowlist.
| Parameters | |
|---|---|
quicHost |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Adds a QUIC tag to send in a QUIC handshake's connection options that only affects the client.
See addConnectionOption(String) for more details.
| Parameters | |
|---|---|
clientConnectionOption |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
|
Adds a QUIC tag to send in a QUIC handshake's connection options.
The QUIC tags should be presented as strings up to four letters long
(for instance, NBHD).
As the QUIC tags are under active development and some are only relevant to the server, Cronet doesn't attempt to maintain a complete list of all supported QUIC flags as a part of the API. The flags. Flags supported by QUICHE, a QUIC implementation used by Cronet and Google servers, can be found here.
| Parameters | |
|---|---|
connectionOption |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Adds a QUIC version to the list of QUIC versions to enable.
If no versions are specified, Cronet will use a list of default QUIC versions.
The version format is specified by QUICHE. Outside of filtering out values known to be obsolete, Cronet doesn't process the versions anyhow and simply passes them along to QUICHE.
| Parameters | |
|---|---|
enabledQuicVersion |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets an arbitrary QUICHE flag. Flags should be passed in FLAG_NAME=FLAG_VALUE
format.
See the QUICHE code base for a full list
of flags.
| Parameters | |
|---|---|
extraQuicheFlag |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Creates and returns the final QuicOptions instance, based on the values
in this builder.
| Returns | |
|---|---|
QuicOptions |
|
Sets whether QUIC sessions should be closed on IP address change.
Don't use in combination with connection migration
(configured using ConnectionMigrationOptions).
| Parameters | |
|---|---|
closeSessionsOnIpChange |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets whether Cronet should wait for the primary path (usually QUIC) to be ready even if there's a secondary path of reaching the server (SPDY / HTTP2) which is ready immediately.
| Parameters | |
|---|---|
delayJobsWithAvailableSpdySession |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets whether TLS with 0-RTT should be enabled.
0-RTT is a performance optimization avoiding an extra round trip when resuming connections to a known server.
| Parameters | |
|---|---|
enableTlsZeroRtt |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
See also:
Sets whether QUIC sessions should be goaway'd on IP address change.
Don't use in combination with connection migration
(configured using ConnectionMigrationOptions).
| Parameters | |
|---|---|
goawaySessionsOnIpChange |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets whether the broken server period should scale exponentially.
If set to true, the initial delay (configurable
by setInitialBrokenServicePeriodSeconds(long)) will be scaled exponentially for
subsequent retries (SCALING_FACTOR^NUM_TRIES * delay). If false, the delay will
scale linearly (SCALING_FACTOR * NUM_TRIES * delay).
| Parameters | |
|---|---|
increaseBrokenServicePeriodExponentially |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets whether requests that failed with a QUIC protocol errors should be retried without
using any alt-svc servers.
| Parameters | |
|---|---|
retryWithoutAltSvcOnQuicErrors |
boolean |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the timeout for a connection SSL handshake.
| Parameters | |
|---|---|
cryptoHandshakeTimeoutSeconds |
long |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the user agent to be used outside of HTTP requests (for example for QUIC handshakes).
To set the default user agent for HTTP requests, use
setUserAgent(String) instead.
| Parameters | |
|---|---|
handshakeUserAgent |
String |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the maximum idle time for a connection. TODO what happens to connection that are idle for too long?
| Parameters | |
|---|---|
idleConnectionTimeoutSeconds |
long |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets how many server configurations (metadata like list of alt svc, whether QUIC is supported, etc.) should be held in memory.
If the storage path is set (setStoragePath(String), Cronet will also persist
the server configurations on disk.
| Parameters | |
|---|---|
inMemoryServerConfigsCacheSize |
int |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the initial for which Cronet shouldn't attempt to use QUIC for a given server after the server's QUIC support turned out to be broken.
Once Cronet detects that a server advertises QUIC but doesn't actually speak it, it marks the server as broken and doesn't attempt to use QUIC when talking to the server for an amount of time. Once Cronet is past this point it will try using QUIC again. This is to balance short term (there's no point wasting resources to try QUIC if the server is broken) and long term (the breakage might have been temporary, using QUIC is generally beneficial) interests.
The delay is increased every unsuccessful consecutive retry. See
increaseBrokenServicePeriodExponentially(boolean) for details.
| Parameters | |
|---|---|
initialBrokenServicePeriodSeconds |
long |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the maximum idle time for a connection which hasn't completed a SSL handshake yet.
| Parameters | |
|---|---|
preCryptoHandshakeIdleTimeoutSeconds |
long |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |
Sets the maximum desired time between packets on wire.
When the retransmittable-on-wire time is exceeded Cronet will probe quality of the network using artificial traffic. Smaller timeouts will typically result in faster discovery of a broken or degrading path, but also larger usage of resources (battery, data).
| Parameters | |
|---|---|
retransmittableOnWireTimeoutMillis |
long |
| Returns | |
|---|---|
QuicOptions.Builder |
the builder for chaining |