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

Method broadcast

src/device/console_server.cpp:382–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382void ConsoleServer::broadcast(const char *json)
383{
384 TempAllocator4096 ta;
385 Array<u32> clients(ta);
386
387 {
388 ScopedMutex scoped_mutex(_clients_mutex);
389
390 const u32 num_clients = vector::size(_clients);
391 array::reserve(clients, num_clients);
392 for (u32 i = 0; i < num_clients; ++i)
393 array::push_back(clients, _clients[i].id);
394 }
395
396 for (u32 i = 0; i < array::size(clients); ++i)
397 send(clients[i], json);
398}
399
400void ConsoleServer::execute_message_handlers(bool sync)
401{

Callers 7

notify_add_fileFunction · 0.80
notify_remove_fileFunction · 0.80
notify_add_treeFunction · 0.80
notify_remove_treeFunction · 0.80
notify_change_fileFunction · 0.80
console_logFunction · 0.80
load_apiFunction · 0.80

Calls 1

sizeFunction · 0.50

Tested by

no test coverage detected