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

Function get_socket_by_id

src/device/console_server.cpp:213–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211 }
212
213 static bool get_socket_by_id(TCPSocket *socket, ConsoleServer &cs, u32 id)
214 {
215 ScopedMutex scoped_mutex(cs._clients_mutex);
216
217 const u32 num_clients = vector::size(cs._clients);
218 for (u32 cc = 0; cc < num_clients; ++cc) {
219 if (cs._clients[cc].id == id) {
220 *socket = cs._clients[cc].socket;
221 return true;
222 }
223 }
224
225 return false;
226 }
227
228} // namespace console_server_internal
229

Callers 2

sendMethod · 0.85
run_output_threadMethod · 0.85

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected