/** * What one connection attempt to an address did. This is the host primitive * the containment probe classifies: it opens a socket, reports how the * attempt ended, and closes it without writing a byte. * * It lives here rather than beside the probe because sockets open only under * `src/http` and `src/egress`, and because none of its outcomes can be told * apart from their mutants by a test in this process: a kernel decides which * of them happens. */ export type DialOutcome = { readonly state: "CONNECTED"; } | { readonly state: "REFUSED"; } | { readonly state: "TIMED_OUT"; } | { readonly state: "UNREACHABLE"; readonly code: string; } | { readonly state: "UNRESOLVED"; readonly code: string; } | { readonly state: "OTHER"; readonly code: string; }; /** Classify a single error into the outcome the probe reads. */ export declare function dialOutcomeFor(code: string): DialOutcome; /** * Open a socket to `host:port` and report how it ended. Nothing is written * and nothing is read: a probe that authenticated would have to hold the * credential it is checking the absence of. */ export declare function dial(host: string, port: number, timeoutMs: number): Promise; //# sourceMappingURL=TcpProbe.d.ts.map