mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-18 15:13:00 +08:00
docs
This commit is contained in:
parent
c55db8a895
commit
ff07d261b2
@ -213,9 +213,9 @@ struct mg_connection {
|
||||
...
|
||||
}
|
||||
|
||||
// Every accepted connection inherit `my_data` pointer, but we change
|
||||
// Every accepted connection inherit NULL pointer as c->fn_data, but we change
|
||||
// it per-connection to something else
|
||||
mg_http_listen(&mgr, "http://localhost:1234", fn, my_data);
|
||||
mg_http_listen(&mgr, "http://localhost:1234", fn, NULL);
|
||||
```
|
||||
Another option is to use `c->label` buffer, which can
|
||||
hold some amount of connection-specific data without extra memory allocation:
|
||||
|
Loading…
Reference in New Issue
Block a user