NetworkClientEmulateNetworkConditionsAsync Method |
Version 130.1.90
Activates emulation of network conditions.
Namespace: CefSharp.DevTools.NetworkAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax public Task<DevToolsMethodResponse> EmulateNetworkConditionsAsync(
bool offline,
double latency,
double downloadThroughput,
double uploadThroughput,
ConnectionType? connectionType = null,
double? packetLoss = null,
int? packetQueueLength = null,
bool? packetReordering = null
)
public:
Task<DevToolsMethodResponse^>^ EmulateNetworkConditionsAsync(
bool offline,
double latency,
double downloadThroughput,
double uploadThroughput,
Nullable<ConnectionType> connectionType = nullptr,
Nullable<double> packetLoss = nullptr,
Nullable<int> packetQueueLength = nullptr,
Nullable<bool> packetReordering = nullptr
)
Parameters
- offline Boolean
- True to emulate internet disconnection.
- latency Double
- Minimum latency from request sent to response headers received (ms).
- downloadThroughput Double
- Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
- uploadThroughput Double
- Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
- connectionType NullableConnectionType (Optional)
- Connection type if known.
- packetLoss NullableDouble (Optional)
- WebRTC packet loss (percent, 0-100). 0 disables packet loss emulation, 100 drops all the packets.
- packetQueueLength NullableInt32 (Optional)
- WebRTC packet queue length (packet). 0 removes any queue length limitations.
- packetReordering NullableBoolean (Optional)
- WebRTC packetReordering feature.
Return Value
TaskDevToolsMethodResponsereturns System.Threading.Tasks.Task<DevToolsMethodResponse>
See Also