Class NetworkConditions
public sealed record NetworkConditions : IEquatable<NetworkConditions>
- Inheritance
-
NetworkConditions
- Implements
- Inherited Members
Constructors
NetworkConditions(string, double, double, double)
public NetworkConditions(string UrlPattern, double Latency, double DownloadThroughput, double UploadThroughput)
Parameters
UrlPatternstringOnly 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).
LatencydoubleMinimum latency from request sent to response headers received (ms).
DownloadThroughputdoubleMaximal aggregated download throughput (bytes/sec). -1 disables download throttling.
UploadThroughputdoubleMaximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
Properties
ConnectionType
Connection type if known.
public ConnectionType? ConnectionType { get; init; }
Property Value
DownloadThroughput
Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
public double DownloadThroughput { get; init; }
Property Value
Latency
Minimum latency from request sent to response headers received (ms).
public double Latency { get; init; }
Property Value
Offline
True to emulate internet disconnection.
public bool? Offline { get; init; }
Property Value
- bool?
PacketLoss
WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
public double? PacketLoss { get; init; }
Property Value
PacketQueueLength
WebRTC packet queue length (packet). 0 removes any queue length limitations.
public long? PacketQueueLength { get; init; }
Property Value
- long?
PacketReordering
WebRTC packetReordering feature.
public bool? PacketReordering { get; init; }
Property Value
- bool?
UploadThroughput
Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
public double UploadThroughput { get; init; }
Property Value
UrlPattern
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).
public string UrlPattern { get; init; }