How to check network connectivity on mac os?

I am using c++ in QT.
And I want to check network connection on mac os without ping to server(like "google.com").

How can I do it?

I want to check network connection on mac os

The concept of “network connectivity” doesn’t really make sense. For example, your Mac might have a working Wi-Fi but the DSL between it and the wider Internet is down. Is that network working? Well, if you trying to post a question to DevForums then you’d say the network is not working. But if you’re trying to print to your Wi-Fi printer than you’d say that the network is working just fine.

So, to get a meaningful answer here you have to ask a more concrete question.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"

I want to check network connection on mac os without ping to server(like "google.com").

That's good, because I'm pretty sure that this kind of use would be against Google's Terms and Conditions.

What you should do is just assume that all network connections will succeed. Then, if they don't for some reason, you handle the error gracefully.




How to check network connectivity on mac os?
 
 
Q