NetworkConditions

@Serializable
data class NetworkConditions(val urlPattern: String, val latency: Double, val downloadThroughput: Double, val uploadThroughput: Double, val connectionType: Network.ConnectionType? = null, val packetLoss: Double? = null, val packetQueueLength: Int? = null, val packetReordering: Boolean? = null, val offline: Boolean? = null)

Constructors

Link copied to clipboard
constructor(urlPattern: String, latency: Double, downloadThroughput: Double, uploadThroughput: Double, connectionType: Network.ConnectionType? = null, packetLoss: Double? = null, packetQueueLength: Int? = null, packetReordering: Boolean? = null, offline: Boolean? = null)

Properties

Link copied to clipboard

Connection type if known.

Link copied to clipboard

Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.

Link copied to clipboard

Minimum latency from request sent to response headers received (ms).

Link copied to clipboard

True to emulate internet disconnection.

Link copied to clipboard

WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.

Link copied to clipboard

WebRTC packet queue length (packet). 0 removes any queue length limitations.

Link copied to clipboard

WebRTC packetReordering feature.

Link copied to clipboard

Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.

Link copied to clipboard

Only matching requests will be affected by these conditions. Patterns use the URLPattern constructor string syntax (https://urlpattern.spec.whatwg.org/) and must be absolute. If the pattern is empty, all requests are matched (including p2p connections).