MCPcopy Create free account
hub / github.com/Marus/cortex-debug / waitForPortOpen

Method waitForPortOpen

src/tcpportscanner.ts:358–364  ·  view source on GitHub ↗

* Wait for port to open. We always do a minium of one try regardless of timeouts, so setting a timeout * of 0 means only one try * * @return a promise. On failure, the error is Error('timeout') for a true timeout or something else * for other failures

(
        port, host = TcpPortScanner.DefaultHost, checkLocalHostAliaes = true,
        retryTimeMs = 100, timeOutMs = 5000)

Source from the content-addressed store, hash-verified

356 * for other failures
357 */
358 public static waitForPortOpen(
359 port, host = TcpPortScanner.DefaultHost, checkLocalHostAliaes = true,
360 retryTimeMs = 100, timeOutMs = 5000): Promise<void> {
361 retryTimeMs = Math.max(retryTimeMs, 1);
362 const opts = new PortStatusArgs(true, port, host, checkLocalHostAliaes, retryTimeMs, timeOutMs);
363 return TcpPortScanner.waitForPortStatusEx(opts);
364 }
365
366 /**
367 * Wait for port to close. We always do a minium of one try regardless of timeouts, so setting a timeout

Callers 2

waitForPortOpenOSUtlMethod · 0.45

Calls 1

waitForPortStatusExMethod · 0.45

Tested by

no test coverage detected