So I'm setting up a network watchdog. I have a list of, say, 24 IP addresses I want to ping periodically and set status bits to see if they're around. I'd like to run it every so often. My instinct would be to set up a staged process, where the ping jumps to either an error stage or a success stage, where the result bit is set accordingly.
Wanting to run it every five seconds, however, I'd want to use a task ... which is incompatible with stages. I could use a for loop inside a task, but I'm unclear how the asynchronous nature of the ping would work with indexing a results array. I'm sure this is a pretty basic program structure question, and I'm hoping it will help me understand how best to do this.
Thanks.