soelknight
Member
- Joined
- Jul 6, 2007
- Messages
- 8
- Programming Experience
- Beginner
Hey all, I am noob to VB.Net and most Object Orientated (OO) Programming. Mainly I have programmed with PHP and a small amount of JavaScript (AJAX), I am using VS 2005 Express (Visual Basic) because I don't know any better. I am an independant network consultant and am interested in pinging multiple hosts fast (but accurate). I have been playing around with threading which seems over my head. As well as sending things async which is ok but I am having troubles sending multiple pings at a time and dealing with the results in an effective manor.
My question:
Is there a good way to do this fast (but accurate) by sending multiple pings? I am not interested in getting status really about the ping except maybe RTT in MS and wether it worked or not.
My vision for this program (my ideal program):
-Grab an array of DNS names from a text file or something. Ex. server1, pc1, pc2, pc3, etc. (This part I can probably do with some time and googleing...)
-Send all the pings async and at the same time. (I have googleed the heck out of it and cannot find anything that works.)
-When the pings return with a success or failure, update multiple buttons (Why buttons, because it was easy to add on the form.) backcolor on my form to be red for failed and green for success.
-Maybe also having a label next to the button that updated with RTT in MS next to it. (This would just be nice.)
Things I have tried:
-My.Computer.Network.Ping(hostname) <-- which is slow and blocking (i hope this is the right termm, I mean sending them in sync).
-Ping.SendAsync(hostname, 300, WaitEvent) <-- this is much quicker but I cannot seem to get multiple to send without blocking the responses so the next one sends when the first one has been returned.
- I have tried using the WMI to get some information but I cannot seem to get the correct level of access to the hosts to get anything useful and I am not sure if this was faster or not.
Sorry if I said some dumb stuff but I have searched and searched for weeks to months trying to figure this out, I appreciate any help or direction!
My question:
Is there a good way to do this fast (but accurate) by sending multiple pings? I am not interested in getting status really about the ping except maybe RTT in MS and wether it worked or not.
My vision for this program (my ideal program):
-Grab an array of DNS names from a text file or something. Ex. server1, pc1, pc2, pc3, etc. (This part I can probably do with some time and googleing...)
-Send all the pings async and at the same time. (I have googleed the heck out of it and cannot find anything that works.)
-When the pings return with a success or failure, update multiple buttons (Why buttons, because it was easy to add on the form.) backcolor on my form to be red for failed and green for success.
-Maybe also having a label next to the button that updated with RTT in MS next to it. (This would just be nice.)
Things I have tried:
-My.Computer.Network.Ping(hostname) <-- which is slow and blocking (i hope this is the right termm, I mean sending them in sync).
-Ping.SendAsync(hostname, 300, WaitEvent) <-- this is much quicker but I cannot seem to get multiple to send without blocking the responses so the next one sends when the first one has been returned.
- I have tried using the WMI to get some information but I cannot seem to get the correct level of access to the hosts to get anything useful and I am not sure if this was faster or not.
Sorry if I said some dumb stuff but I have searched and searched for weeks to months trying to figure this out, I appreciate any help or direction!