I'm building an application that harvests data from the web. But if there is not a connection, I want to display a message, however if there is a connection I want the program to carry on.
In pseudo code it'd be something like:
if (connection == true) {
// Get Data
} else {
// Output error message
}
But how would I actually find out if there is a connection to start with to do this?