HighBandwidthConnectionLease

Cancellable network request token. Allows caller to release the connection or await it becoming available.

Functions

Link copied to clipboard
abstract suspend fun awaitGranted(timeout: Duration): Boolean

Await a connection being granted on this lease. The connection could be immediately revoked, so apps should check available networks after this call completes. May return immediately if a network is unlikely to be granted.

Link copied to clipboard
abstract fun close()