summaryrefslogtreecommitdiff
path: root/docs/ref/stat/nng_stat_child.adoc
blob: 09bf98e134ef0b82be90563623bc0ffd3b2e11f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## nng_stat_child

Get child statistic.

### Synopsis

```c
#include <nng/nng.h>

typedef struct nng_stat nng_stat;

nng_stat *nng_stat_child(nng_stat *parent);
```

### Description

The `nng_stat_child` function returns the first child statistic of the statistic _parent_.
If no children are present, then `NULL` is returned.

TIP: Only statistics with type (see xref:nng_stat_type.adoc[`nng_stat_type`]) of `NNG_STAT_SCOPE` will have children.

### Return Values

The first child statistic of _parent_, or NULL if _parent_ has no children.

### See Also

xref:nng_stat_next.adoc[nng_stat_next],
xref:nng_stats_get.adoc[nng_stats_get]