Check Server Stats (online/offline)
So my deal is pretty simple (or maybe not), I just wanted to know, how can I check the status of a server/domain (offline/online) with QtNetwork.
For example I want to check if “google.com” is online, how do I do to check his stats, pinging it? or is there any other solutions, preferably using QtNetwork
PS – I never used QtNetwork before.
All it depends on your definition of “online”. If it’s “it responds to an ICMP ping”, then you can’t do that with QtNetwork (but you can simply invoke the ping utility on your system by using QProcess). If it is “it responds to HTTP on port 80” you can try to issue a HEAD request using QNetworkAccessManager.