mirror of
https://github.com/shadowsocks/ShadowsocksX-NG.git
synced 2026-11-08 11:14:51 +00:00
13 lines
475 B
Swift
13 lines
475 B
Swift
import Foundation
|
|
|
|
/// 端点探测缝:注入以便控制器单测(真实探测走 EndpointHealthProbe)。
|
|
protocol EndpointProbing: Sendable {
|
|
func probe(host: String, port: Int, timeout: TimeInterval) async -> EndpointHealthProbe.Outcome
|
|
}
|
|
|
|
struct SystemEndpointProbe: EndpointProbing {
|
|
func probe(host: String, port: Int, timeout: TimeInterval) async -> EndpointHealthProbe.Outcome {
|
|
EndpointHealthProbe.probe(host: host, port: port, timeout: timeout)
|
|
}
|
|
}
|