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