i’m trying to get computer’s state in my LAN…
thought about using QTcpSocket but it’s not realy effective since port also should be inserted as:
socket->connectToHost("hostName", portNumber);
if (socket->waitForConnected(1000))
qDebug("Connected!");
can anyone demonstare me a better way to check if computer is responding ?
ping
Arguments may vary. For example, I believe it would be
ping -n 1 "hostname"on Windows. The example should work on most non-Windows versions.