| 172 | } |
| 173 | |
| 174 | static u32 add_client(ConsoleServer &cs, const TCPSocket &socket) |
| 175 | { |
| 176 | ScopedMutex scoped_mutex(cs._clients_mutex); |
| 177 | |
| 178 | ConsoleServer::Client client; |
| 179 | client.socket = socket; |
| 180 | client.id = cs._next_client_id++; |
| 181 | vector::push_back(cs._clients, client); |
| 182 | |
| 183 | return client.id; |
| 184 | } |
| 185 | |
| 186 | static void remove_client_by_socket(ConsoleServer &cs, const TCPSocket &socket) |
| 187 | { |