Important alert: (current site time 7/15/2013 9:07:08 AM EDT)
 

winzip icon

ParaPing.Net by Light Templer

Email
Submitted on: 12/5/2006 6:52:04 AM
By: Light Templer 
Level: Intermediate
User Rating: By 16 Users
Compatibility: VB.NET
Views: 9925
(About the author)
 
     A class to ping to many hosts the same time by .net 2.0 async Ping calls in the background. Its implemented as a FirstIn-FirstOut queue which accepts every item you put in only once. Its used to hold IP adresses or hostnames (will be resolved by DNS requests). The destination hosts will be async pinged and an event will be raised for every result. Its carefully written and documented with VS 2005-VB.Net and tested within a network with about 1000 clients. _______ UPDATE 1: Thx to Tom Waller: Memory bug of .net's Ping object fixed. See details in code. _______ Comments and suggestions are welcome, votes are motivating - thx for! 4/2005, 12/2006 - Light Templer

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

4/5/2006 1:10:54 AMKnoton

Hello Lite :-)
I havent looked at your code yet.
No time on my way to work.
Just wanted to say I am glad to see
you in PSC .Net Area. Looking forward
to see great submissions from you :-)
(If this comment was disrespectful, please report it.)

 
4/5/2006 4:34:23 AMLight Templer

Thx Knoton :-) I'm glad to see guys like you and Mario Flores G. in this PSC area, too! With VS 2005 and .net 2.0 the time is right to go further. The advantages are too much to stay on VB6 only ;-) Kind regards - LiTe
(If this comment was disrespectful, please report it.)

 
4/7/2006 4:07:28 AMLight Templer

The .net section of PSC is a much more difficult corner than the VB corner: Less submissions und nearly none votes even for quality stuff. Folks: What are you expecting if you don't give comments / votes to authors which spent many hours to write demos and docs to a class? They don't need this for themself, its just for you! ;-) So if you don't recognize this PSC section stays as poor as it is right now. (And it should be the future of programming!)
Just my thoughts - regards LiTe
(If this comment was disrespectful, please report it.)

 
4/10/2006 6:30:39 AMMatjaz Bravc

Nice example!
(If this comment was disrespectful, please report it.)

 
4/10/2006 10:48:07 AMKnoton

Hello Lite,
I have just tried it out.
Works great :-)
I especially gonna get good use of your
enums for comp in network and AD. Thanks :-)
(If this comment was disrespectful, please report it.)

 
4/12/2006 4:02:47 AMSyed Muhammad Fahad

Hmmm Good work! 5 From me :) I dont mind voting for good Stuff! ;) The code can be much improved via proper exception handling ,,,
(If this comment was disrespectful, please report it.)

 
4/12/2006 5:22:16 AMLight Templer

Syed, thx alot for the first hint to improvement! Plz tell me more: What 's to improve in execption handling? Class works fine for me so far, but if there is something to get better: Anytime!
(If this comment was disrespectful, please report it.)

 
4/13/2006 2:54:51 AMLight Templer

Syed: Thx for your details in your email to me.
____ All: All needed exception handling in ParaPing class itself is included of course. Syed just means the small demo app :-)
(If this comment was disrespectful, please report it.)

 
4/18/2006 1:09:42 PMSteppenwolfe

Nice one Lite.. but consider coming over to C#.. ;o)
Think about adding some AD dimensions to this, (in est, object management), good examples of that are hard to find.
As for legacy vb side, I disagree, only thing people typically vote for [newbs], are user controls, (a fact that is much exploited by the shameless.. ;o)
5 from me!
(If this comment was disrespectful, please report it.)

 
5/14/2006 12:45:13 PMhasan

i am sure that u waste a lot of time to complete this grate job.... thank u very much

(If this comment was disrespectful, please report it.)

 
5/14/2006 6:57:14 PMLight Templer

I spent, not waste it ;-)
(If this comment was disrespectful, please report it.)

 
5/29/2006 5:04:11 AMJim Jose

Comments are tooo HOT !! :)) LiTe... I just started learning .Net and I know ur posts are always helpfull for anyone to improve their knowledge. NICE WORK & CONGRATS on ur CTOM @ vb.net
(If this comment was disrespectful, please report it.)

 
12/4/2006 4:43:04 PMTom Waller

Hi Light

Absolutly wonderfull coding here. Truely async pinging all the way. Exactly what I was looking for! Also, thanks for all the help you gave me with the memory issue.

Kindest regards.

Tom
(If this comment was disrespectful, please report it.)

 
12/5/2006 6:22:46 PMpaul

Light Templer, good work. I've followed your stuff right through from VB6. Good to see you here in dotnet.
(If this comment was disrespectful, please report it.)

 
3/30/2007 8:18:28 AMDreamcoding

Great work Light! Just getting into .net and this is a very good example. Big fan of your VB6 work. Please keep it up.
(If this comment was disrespectful, please report it.)

 
5/9/2007 5:53:31 PMmarcasdasdf

this is exactely what i was looking for. thank you. excellent work.
(If this comment was disrespectful, please report it.)

 
5/4/2012 6:16:37 PMChris

What is the "Speed in MS" value used for? I noticed the max simultaneous pings are for the maximum at one time. but what is the Speed in MS value supposed to do?

This is very good code, exactly what i was looking for, but just curious as what that does as I cannot see any difference when I change it.
(If this comment was disrespectful, please report it.)

 
5/7/2012 2:35:28 PMLight Templer

You can follow this value from demo form code to class' property 'Interval': It gives the timer ticks in milliseconds to wait before next Ping has to be send. The default is 50ms - a very short time. Double it: It's is still a short time :-) It 's to prevent an "over flood" of your network. If there are intruder detection systems installed, maybe they ring the alarm bell, if too many pings are send with too high frequency.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.