fail fast version check

R

Roedy Green

Consider how various programs deal with the problem of notifying you
if there is a new version of a program.

Some require you to manually check.

Some ask you to manually check every 2 weeks or so.

Some warn you that you must be online then abort the check if you say
no.

Some just go ahead and check and timeout if you are not online.

Ideally I would like something unobtrusive that just checks if you are
online and you have permission to visit the site that knows.

Is there a way of quickly finding out if you are not online or if a
firewall is blocking access?
--
Roedy Green Canadian Mind Products
http://mindprod.com

When your language is nowhere near Turing-complete, syntactic sugar can be your friend.
~ Eric S. Raymond (born: 1957-12-04 age: 51) The Cathedral and the Bazaar
 
M

Mike Schilling

Roedy said:
Consider how various programs deal with the problem of notifying you
if there is a new version of a program.

Some require you to manually check.

Some ask you to manually check every 2 weeks or so.

Some warn you that you must be online then abort the check if you
say
no.

Some just go ahead and check and timeout if you are not online.

Ideally I would like something unobtrusive that just checks if you
are
online and you have permission to visit the site that knows.

Is there a way of quickly finding out if you are not online or if a
firewall is blocking access?

Check connectivity to the download site. That's what you really want
to know about. Use a dedicated thread and use a farily quick timeout
on the connect request.
 
M

markspace

Mike said:
Check connectivity to the download site. That's what you really want
to know about. Use a dedicated thread and use a farily quick timeout
on the connect request.


This, especially the part about using a background thread. Don't forget
that JWS does this for you, automagically.

If you're concerned about *your* site specifically being blocked, you
might try a few other well-known sites to see if they fail also.

www.google.com/
www.cnn.com/
198.41.0.4 // a.root-servers.net

If all those are off line, then you are likely offline, rather than just
being blocked. Or the network is so fuggered up you might as well
assume that you're offline.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top