Thanks for reading! The problem is I'm trying to check if there is internet connection in my app build in C++. I tried this method:
bool ICon(){
if (system("ping -c1 -s1 www.google.com"))
{return false;}else{return true;}
}
I linked the method to a listener of a pressed key, and that works, but I will like to bring the app to next level. I don't want to press a key to check if there is or there is not Internet connection. So the method should be running all time checking internet availability, and once is disconnected send me a "FALSE". Well with a while loop of the previous method, the apps collapse. Any other idea to check internet connection fast and continuously?
Thanks in advance!!