feat: add probeDomain function for TCP reachability checks on discovered domains

This commit is contained in:
MayaTheShy
2025-11-08 19:22:08 -05:00
parent a27f4ac32b
commit 2d9fc4fb69

View File

@@ -16,3 +16,7 @@ std::vector<DiscoveredDomain> discoverDomains(int maxDomains = 25);
// Exposed for tests: parse a directory JSON payload into candidate domains.
std::vector<DiscoveredDomain> parseDomainsFromJson(const std::string& json);
// Probe a domain for TCP reachability on its httpPort (non-blocking, short timeout).
// Returns true if the domain appears reachable (TCP connect succeeds or is in progress).
bool probeDomain(const DiscoveredDomain& domain, int timeoutMs = 800);