* 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)
| 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 | |
| 508 | export class PortStatusArgs { |
nothing calls this directly
no test coverage detected