but i'm not sure, if the script is working without D__UCB_DDOS_PROTECTION__ ^^D__UCB_DDOS_PROTECTION__
I think it should check second host if first was off
#ifdef __UCB_DDOS_PROTECTION__
bool isWorldReachable(){
int32_t ret;
#if defined __WINDOWS__
ret = system("ping -n 1 -w 500 google.com > NUL");
if(!ret){
ret = system("ping -n 1 -w 500 secondhost.com > NUL");
}
#else
ret = system("ping -q -c 1 -w 1 google.com > /dev/null");
if(!ret){
ret = system("ping -q -c 1 -w 1 secondhost.com > NUL");
}
#endif
return (ret == 0);
}
#endif