MCPcopy Create free account
hub / github.com/crownengine/crown / get_client_id

Function get_client_id

src/device/console_server.cpp:200–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

run_input_threadMethod · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected