| 198 | } |
| 199 | |
| 200 | static u32 get_client_id(ConsoleServer &cs, const TCPSocket &socket) |
| 201 | { |
| 202 | ScopedMutex scoped_mutex(cs._clients_mutex); |
| 203 | |
| 204 | const u32 num_clients = vector::size(cs._clients); |
| 205 | for (u32 cc = 0; cc < num_clients; ++cc) { |
| 206 | if (cs._clients[cc].socket == socket) |
| 207 | return cs._clients[cc].id; |
| 208 | } |
| 209 | |
| 210 | return UINT32_MAX; |
| 211 | } |
| 212 | |
| 213 | static bool get_socket_by_id(TCPSocket *socket, ConsoleServer &cs, u32 id) |
| 214 | { |
no test coverage detected