mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-05 10:58:59 +08:00
849ec1684a
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
676 B
676 B
title | decl_name | symbol_kind | signature |
---|---|---|---|
mg_broadcast() | mg_broadcast | func | void mg_broadcast(struct mg_mgr *, mg_event_handler_t func, void *, size_t); |
Passes a message of a given length to all connections.
Must be called from a thread that does NOT call mg_mgr_poll()
.
Note that mg_broadcast()
is the only function
that can be, and must be, called from a different (non-IO) thread.
func
callback function will be called by the IO thread for each
connection. When called, the event will be MG_EV_POLL
, and a message will
be passed as the ev_data
pointer. Maximum message size is capped
by MG_CTL_MSG_MESSAGE_SIZE
which is set to 8192 bytes.