MCPcopy Index your code
hub / github.com/inkeep/open-knowledge / tcpReachable

Function tcpReachable

packages/cli/tests/e2e/cli-linux-e2e.ts:83–89  ·  view source on GitHub ↗
(port: number, timeoutMs = 2000)

Source from the content-addressed store, hash-verified

81}
82
83async function tcpReachable(port: number, timeoutMs = 2000): Promise<boolean> {
84 const [v4, v6] = await Promise.all([
85 tcpConnect('127.0.0.1', port, timeoutMs),
86 tcpConnect('::1', port, timeoutMs),
87 ]);
88 return v4 || v6;
89}
90
91function readLockPort(): number | null {
92 if (!existsSync(H.lockPath)) return null;

Callers 1

cli-linux-e2e.tsFile · 0.85

Calls 1

tcpConnectFunction · 0.85

Tested by

no test coverage detected