mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-02 13:20:51 +00:00
Using mg_connection::callback_param for mg_iterate_over_connection()
This commit is contained in:
1 parent
c9036f3ac0
commit
a3a63f7e56
4 files changed
+6
-5
No files matched your search
@@ -6,7 +6,7 @@ extern const char *find_embedded_file(const char *, size_t *);
|
||||
static int iterate_callback(struct mg_connection *c) {
|
||||
if (c->is_websocket) {
|
||||
char buf[20];
|
||||
int len = snprintf(buf, sizeof(buf), "%d", * (int *) c->connection_param);
|
||||
int len = snprintf(buf, sizeof(buf), "%d", * (int *) c->callback_param);
|
||||
mg_websocket_write(c, 1, buf, len);
|
||||
}
|
||||
return MG_REQUEST_PROCESSED;
|
||||
|
||||
Reference in new issue
Block a user