checkPort method
检测单个端口是否可连接 / Checks whether a single port accepts connections.
Implementation
Future<PortCheckResult> checkPort({
required String host,
required int port,
Duration? timeout,
}) async {
return PortCheckResult(
host: host,
port: port,
isOpen: false,
responseTime: Duration.zero,
errorMessage: 'TCP port scanning is not available on the web platform.',
timestamp: DateTime.now(),
);
}