public override async Task <bool> ProcessItem(ServiceInput item) { var pingResult = await ScannersCommon.Ping(new PingInput { Address = item.Endpoint.Address, Retries = item.Retries, Timeout = item.Timeout }); if (pingResult.Reply == null || pingResult.Reply.Status != IPStatus.Success) { return(false); } var scanResult = await ScannersCommon.IsPortOpen(new PortInput { Address = item.Endpoint.Address, Ports = new List <int> { item.Endpoint.Port }, Retries = item.Retries, Timeout = item.Timeout }, portClient); return(scanResult[0].IsOpen); }
public override Task <List <PortResult> > ProcessItem(PortInput item) { return(ScannersCommon.IsPortOpen(item, portClient)); }