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

Method shouldUseServerMethod

src/tcpportscanner.ts:414–420  ·  view source on GitHub ↗

* quick/dirty way of figuring out if this is a local host. guaranteed way would have * been to do a dns.resolve() or dns.lookup(). server method only works for local hosts. * Client method works for anything but super slow on windows. * * FIXME: should we use server-method only on w

(host: string)

Source from the content-addressed store, hash-verified

412 * @param host an ip-address
413 */
414 protected static shouldUseServerMethod(host: string): boolean {
415 if (TcpPortScanner.ForceClientMethod) {
416 return false;
417 }
418 return (!host || (host.toLowerCase() === 'localhost') ||
419 (TcpPortScanner.getLocalHostAliases().indexOf(host) >= 0));
420 }
421}
422
423export class PortStatusArgs {

Callers

nothing calls this directly

Calls 1

getLocalHostAliasesMethod · 0.45

Tested by

no test coverage detected