diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-08-11 22:12:30 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-08-11 22:12:38 -0700 |
| commit | d3652db599cb3bf4101cf2e6cf42c764d65b6fb8 (patch) | |
| tree | 1ca0bd8f2ed991abb96b02b56d7010f8680703e3 /include | |
| parent | 6e5cf2967bc8717ab712a6cdda9d297d18bdeef0 (diff) | |
| download | nng-d3652db599cb3bf4101cf2e6cf42c764d65b6fb8.tar.gz nng-d3652db599cb3bf4101cf2e6cf42c764d65b6fb8.tar.bz2 nng-d3652db599cb3bf4101cf2e6cf42c764d65b6fb8.zip | |
idhash: add nng_id_visit API
This allows an efficient way to iterate over the entries
stored in an ID hash. The iteration is fast, and requires no
additional storage. The order of iteration is not guaranteed.
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/supplemental/util/idhash.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/nng/supplemental/util/idhash.h b/include/nng/supplemental/util/idhash.h index 8f691d08..f231a554 100644 --- a/include/nng/supplemental/util/idhash.h +++ b/include/nng/supplemental/util/idhash.h @@ -27,6 +27,7 @@ NNG_DECL void *nng_id_get(nng_id_map *, uint64_t); NNG_DECL int nng_id_set(nng_id_map *, uint64_t, void *); NNG_DECL int nng_id_alloc(nng_id_map *, uint64_t *, void *); NNG_DECL int nng_id_remove(nng_id_map *, uint64_t); +NNG_DECL bool nng_id_visit(nng_id_map *, uint64_t *, void **, uint32_t *); #ifdef __cplusplus } |
