ConnectionMigrationOptions

public final class ConnectionMigrationOptions


A class configuring Cronet's connection migration functionality.

Connection migration stops open connections to servers from being destroyed when the client device switches its L4 connectivity (typically the IP address as a result of using a different network). This is particularly common with mobile devices losing wifi connectivity and switching to cellular data, or vice versa (a.k.a. the parking lot problem). QUIC uses connection identifiers which are independent of the underlying transport layer to make this possible. If the client connects to a new network and wants to preserve the existing connection, they can do so by using a connection identifier the server knows to be a continuation of the existing connection.

The features are only available for QUIC connections and the server needs to support connection migration.

Summary

Nested types

Builder for ConnectionMigrationOptions.

An annotation for APIs which are not considered stable yet.

Public methods

builder

public static ConnectionMigrationOptions.Builder builder()

getAllowNonDefaultNetworkUsage

public @Nullable Boolean getAllowNonDefaultNetworkUsage()

getAllowServerMigration

public @Nullable Boolean getAllowServerMigration()

getEnableDefaultNetworkMigration

public @Nullable Boolean getEnableDefaultNetworkMigration()

getEnablePathDegradationMigration

public @Nullable Boolean getEnablePathDegradationMigration()

getIdleMigrationPeriodSeconds

public @Nullable Long getIdleMigrationPeriodSeconds()

getMaxPathDegradingEagerMigrationsCount

public @Nullable Integer getMaxPathDegradingEagerMigrationsCount()

getMaxTimeOnNonDefaultNetworkSeconds

public @Nullable Long getMaxTimeOnNonDefaultNetworkSeconds()

getMaxWriteErrorEagerMigrationsCount

public @Nullable Integer getMaxWriteErrorEagerMigrationsCount()

getMigrateIdleConnections

public @Nullable Boolean getMigrateIdleConnections()

getRetryPreHandshakeErrorsOnAlternateNetwork

public @Nullable Boolean getRetryPreHandshakeErrorsOnAlternateNetwork()