NetworkDiagnosticConfig class
全局默认诊断参数 / Global default parameters used by the diagnostic APIs.
所有字段都有合理默认值,可按需覆盖后通过 ZeroNetworkKit.init(config: ...)
全局生效。/ Every field has a sensible default; override as needed and apply
globally through ZeroNetworkKit.init(config: ...).
Constructors
-
NetworkDiagnosticConfig({String pingHost = '1.1.1.1', int pingPort = 443, int pingCount = 4, Duration pingTimeout = const Duration(seconds: 3), Duration pingInterval = const Duration(milliseconds: 200), String dnsDomain = 'www.google.com', List<
String> dnsServers = const <String>['1.1.1.1', '8.8.8.8', '114.114.114.114'], Duration dnsTimeout = const Duration(seconds: 5), String downloadUrl = 'https://speed.cloudflare.com/__down?bytes=25000000', String uploadUrl = 'https://speed.cloudflare.com/__up', int uploadPayloadBytes = 1048576, Duration speedTestTimeout = const Duration(seconds: 30), Duration speedTestMaxDuration = const Duration(seconds: 10), Duration portCheckTimeout = const Duration(seconds: 3), List<int> probePorts = const <int>[80, 443], QualityTargets qualityTargets = const QualityTargets()}) -
构造 NetworkDiagnosticConfig / Creates a NetworkDiagnosticConfig.
const
Properties
- dnsDomain → String
-
默认 DNS 测试域名 / Default domain used for DNS tests.
final
-
dnsServers
→ List<
String> -
默认 DNS 服务器列表 / Default DNS servers used for DNS tests.
final
- dnsTimeout → Duration
-
单台 DNS 服务器查询超时 / Timeout of a single DNS query.
final
- downloadUrl → String
-
默认下载测速地址 / Default download endpoint for the speed test.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- pingCount → int
-
默认 Ping 探测次数 / Default number of ping probes.
final
- pingHost → String
-
默认 Ping 目标主机 / Default ping target host.
final
- pingInterval → Duration
-
Ping 探测间隔 / Delay between two ping probes.
final
- pingPort → int
-
默认 Ping 目标端口(TCP 模式)/ Default ping target port (TCP mode).
final
- pingTimeout → Duration
-
单次 Ping 探测超时 / Timeout of a single ping probe.
final
- portCheckTimeout → Duration
-
端口检测超时 / Timeout of a single port check.
final
-
probePorts
→ List<
int> -
默认端口扫描列表 / Default ports probed by
scanPorts().final - qualityTargets → QualityTargets
-
质量评分的理想值参考 / Ideal values used by the quality evaluator.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speedTestMaxDuration → Duration
-
测速单阶段最长采样时长 / Maximum sampling window of one speed test phase.
final
- speedTestTimeout → Duration
-
测速单请求超时 / Per-request timeout of the speed test.
final
- uploadPayloadBytes → int
-
上传测速负载字节数 / Payload size used for the upload speed test.
final
- uploadUrl → String
-
默认上传测速地址 / Default upload endpoint for the speed test.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited