diff options
Diffstat (limited to 'docs/ref/api')
| -rw-r--r-- | docs/ref/api/stats.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ref/api/stats.md b/docs/ref/api/stats.md index 2e0acfcd..1720f605 100644 --- a/docs/ref/api/stats.md +++ b/docs/ref/api/stats.md @@ -56,6 +56,7 @@ The {{i:`nng_stats_free`}} function deallocates the snapshot referenced by _stat ```c const nng_stat *nng_stat_child(const nng_stat *stat); const nng_stat *nng_stat_next(const nng_stat *stat); +const nng_stat *nng_stat_parent(const nng_stat *stat); ``` Traversing the tree of statistics is done using the {{i:`nng_stat_child`}} and @@ -67,6 +68,9 @@ or `NULL` if the _stat_ has no children. The `nng_stat_next` function returns the nearest sibling to the right of _stat_, or `NULL` if _stat_ has no more siblings to the right. +The {{i:`nng_stat_parent`}} function returns the parent of _stat_, or `NULL` if +_stat_ is the root of the statistics tree. + ## Finding a Statistic ```c |
