Connected to the Internet

I’m using a URL Socket to authenticate a user’s activation to an app.
If the network is down, they have to wait a long time to find out that it failed.
Is there a way to determine if the computer’s network interface is live?

Public Function IsInternetConnected() as Boolean
  ' checks if internet is connected by checking the connection to google,apple and microsoft
  ' fastest way found today
  ' see
  Dim http As New TCPSocket
  http.Address = ""
  http.port = 80
  dim okapple as Boolean = (http.LastErrorCode = 0)
  http.Address = ""
  dim okgoogle as Boolean = (http.LastErrorCode = 0)
  http.Address = ""
  dim okmicrosoft as Boolean = (http.LastErrorCode = 0)
  Return okapple and okgoogle and okmicrosoft
End Function

since writing this, I just found built into Xojo. It appears to work fine. Is there a down-side?

PS: how have I never seen this before?

don’t know, but does it check for network only, or also for internet access ?

I don’t know the answer to that.

It does not, was just about to tell you that’s the downside.

good to know.

it basically tells you, on iOS , the radios are powered up and appear to be connected but tells you nothing about the reachability of a given site which can be affected by DNS issues router issues etc etc