-
Mar 24th, 2010, 12:22 PM
#1
[RESOLVED] Pinging - Network Availability - ping-then-do
As you may or may not know I think pinging "something" to determine whether or not to do something is wrong. An example would be ping a mail server, if the ping is good then send the mail. At best it is naive. If you want to discuss it or have an example of when it is better, I'll be glad to.
So yesterday I was involved in another debate and this morning I got up and put together some code that addresses this issue. The code, with sample app can be found here. It runs on XP, and later today I will test with Windows 7.
http://www.vbforums.com/showthread.php?t=608575
What the app does is attempt to find where you meet the internet. When you ping some far distant host, say www.yahoo.com, and get successful replies the internet is up. When unsuccessful is it yahoo, your ISP, or some other ISP along the route.
More importantly do you care if it is beyond your ISP? You can't do anything about it. I think what most of us really want is to know that we can get to our ISP.
So that is what the app does. It basically does a traceroute until it finds the edge, where you meet the internet. From then on it only pings to that address.
So give it a try, let me know what you think.
-
Mar 24th, 2010, 12:39 PM
#2
Re: Pinging - Network Availability - ping-then-do
I should have mentioned this in my first post.
1 - start the application
2 - repair your network connection if you have a DHCP assigned address, or disable / enable your network interface.
You should see several transitions in the app.
-
Mar 24th, 2010, 01:33 PM
#3
Re: Pinging - Network Availability - ping-then-do
-
Mar 24th, 2010, 04:36 PM
#4
Re: Pinging - Network Availability - ping-then-do
Installed and ran OK on Windows 7, except that every app of mine (XP VB2008 Express) that I install shows a message when I double click the SetUp icon.
The message is something to the effect that the application didn't appear to install correctly... But it happens before I click the Install button??? I just close the warning, click Install, and all is well. This the second app that did that.
I took what I posted and put it in another application like this:
MyMonitor = New MonitorNetworkResource(, True) 'monitor path to internet
then in a timer I did this
If MyMonitor.isUp Then Label11.Text = "UP" Else Label11.Text = "DOWN"
and went on with my business. About an hour later I noticed that the label said down, and I'll be danged, it was.
-
Mar 25th, 2010, 04:03 PM
#5
Re: Pinging - Network Availability - ping-then-do
Just updated the code. It now determines the PC's IP address based on the GateWay used to access the internet, so it should work with PC's with more than one adapter, but I have no way of testing.
You can click on the Ban Ping-Then-Do in my signature to get the thread with the latest code.
-
Mar 26th, 2010, 08:02 AM
#6
Re: Pinging - Network Availability - ping-then-do
Originally Posted by dbasnett
Installed and ran OK on Windows 7, except that every app of mine (XP VB2008 Express) that I install shows a message when I double click the SetUp icon.
The message is something to the effect that the application didn't appear to install correctly... But it happens before I click the Install button??? I just close the warning, click Install, and all is well. This the second app that did that.
I took what I posted and put it in another application like this:
MyMonitor = New MonitorNetworkResource(, True) 'monitor path to internet
then in a timer I did this
If MyMonitor.isUp Then Label11.Text = "UP" Else Label11.Text = "DOWN"
and went on with my business. About an hour later I noticed that the label said down, and I'll be danged, it was.
My problem with Windows 7 install was resolved by installing by double clicking MyAppName.application instead of Setup.exe.
-
Mar 26th, 2010, 08:11 AM
#7
Re: Pinging - Network Availability - ping-then-do
FYI
My ISP uses radios (long haul WIFI) to service us rural people. Sometimes the service is spotty. I ran the sample application last night and it detected 81 outages and did so without sending pings across the internet backbone.
-
Mar 30th, 2010, 09:33 AM
#8
Re: Pinging - Network Availability - ping-then-do
There are now three versions of how to do this. You can read all about it by following the Ban Ping-Then-Do link in my signature. One of the samples is just a simple internet up / down program. Here is the screen shot of the complex example
To all of those that helped / are helping, thanks!
-
Mar 30th, 2010, 09:39 AM
#9
Re: [RESOLVED] Pinging - Network Availability - ping-then-do
Shouldn't this be a CodeBank entry?
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 30th, 2010, 09:58 AM
#10
Re: [RESOLVED] Pinging - Network Availability - ping-then-do
That is why I resolved this and added the link in my signature. Click it and see where you go.
-
Mar 30th, 2010, 10:03 AM
#11
Re: [RESOLVED] Pinging - Network Availability - ping-then-do
But it was never a question to begin with -_-
CodeBank contributions: Process Manager, Temp File Cleaner
Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Mar 30th, 2010, 10:24 AM
#12
Re: [RESOLVED] Pinging - Network Availability - ping-then-do
Well I have resolved the thread and the content is where it should be. If this threads presence here offends you, report me and ask the mods to remove the thread.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|