What is the preferred, or even defined, way of broadcasting data to multiple clients?
Currently, I have
for (c = mg_next(socket_nc->mgr, NULL); c != NULL; c = mg_next(socket_nc->mgr, c))
mg_send_websocket_frame(c, WEBSOCKET_OP_TEXT, data, data_len);
However, I frequently get an uninitialized socket (c), which then causes issues, unsurprisingly.
Any pointers, gratefully received