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

Method shouldUseServerMethod

src/remote/src/tcpportscanner.ts:499–505  ·  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

497 * @param host an ip-address
498 */
499 protected static shouldUseServerMethod(host: string): boolean {
500 if (TcpPortScanner.ForceClientMethod) {
501 return false;
502 }
503 return (!host || (host.toLowerCase() === 'localhost') ||
504 (TcpPortScanner.getLocalHostAliases().indexOf(host) >= 0));
505 }
506}
507
508export class PortStatusArgs {

Callers

nothing calls this directly

Calls 1

getLocalHostAliasesMethod · 0.45

Tested by

no test coverage detected