Quote:
Originally posted by Mick_2002
Well, it does not mean _it_ communciated with one of the Major DNS servers, it means also it could communicate with it's own nameserver (it depends on the configuration), which is set to point to another name server in the hierarchy and replicate databases.
Why would my company list slideshowdesktop.com in their nameserver ? I can't figure out how gethostbyname() can return an ip address to my website without communicating with a server outside of my companies internal network ...
Quote:
Just because you can resolve an address, does not mean the address is up, and as you can fail to resolve an address, does not mean that address is down. It's just a name to public block IP address lookup, it's not a connectivity check.
Agreed. However, I'm not interested whether the address is up. I just want to know if a computer external to my network can be reached, thus indicating the internet.
Quote:
Suppose you failed to resolve the address. Again this doesn't mean your site is down, it means that you for whatever reason didn't get an authoriative answer from your DNS server for your address. And as long as router configuration and tables are up to par, I can still use your IP addr to connect.
If I cannot resolve the address, then my using InternetOpenURL() on slideshowdesktop.com is going to fail. So not being able to resolve an address is as good as "site down" according to my updater. I do not wish to code in a static ip address for my update server, in case the provider changes it (or even i change provider) - if the ip changed in the future, this would 'break' my updater for older versions of the software.
Quote:
You could probably go with the ping request timeout since you can tweak the timer on waiting for a reply in the call.
The problem is, my company does not allow icmp echo requests inbound, so the ping packets are never received. However, I am connected to the Internet ! Ping fails, but gethostbyname() succeeds.
Quote:
Either way, you should have a waitcursor/message saying your checking for updates....or do it in the background and if you find updates, then either update your code on the next run, or prompt the user if they want to update with the new code. Or check when your program exits. Lots of ways not to interfere with the user.
I've had an Instant Updater in my software for 18 months now, but it doesn't work on a LAN with a firewall, and incorrectly determines the availability of the Internet when using a cable modem/router - it works perfect with dialup connections (even DSL) and across ICS. I'm now looking to address the issues :)
My updater is highly configurable.
1. will run silently in the background (when the internet is available), and popup a tray balloon (2k/xp), or a dialog (9x/me/nt4).
2. can be configured to run every x days, every time the app is run, or never
3. automatically runs every time when the software trial period has expired.
4. you can specify how you connect to the Internet, to give me a little help in determining the connection.
5. my updater will handle (and accelerate) the download from my website, then install itself (at users request)
Actually I've put a lot of design and coding effort into the updater, but I'm still plagued by some configurations saying "connected - look for an update", when the Internet is not available. It doesn't work across proxies either, which is my next big job :)
None of the above answers are meant as argumentative or are in disagreement - i'm merely trying to debate the issues with somebody who clearly knows what they're talking about (i.e. you:)
Thanks