aboutsummaryrefslogtreecommitdiff
path: root/src/nng.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-29 01:09:36 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-29 01:12:48 -0800
commit4b53b1e31a93af8c739ba555970cb88d73063bce (patch)
tree43e441328faaac832acf80c5fbb4822da11b0264 /src/nng.h
parent6d9175cf737c176799862557dae30df60b289bdf (diff)
downloadnng-4b53b1e31a93af8c739ba555970cb88d73063bce.tar.gz
nng-4b53b1e31a93af8c739ba555970cb88d73063bce.tar.bz2
nng-4b53b1e31a93af8c739ba555970cb88d73063bce.zip
Implementation of an id hash for hashing pipes by ID.
We use some hints from Python's dict implementation, using an open addressing scheme, and just ripping off the lower bits as needed. Since we assign IDs consecutively, this should work well. We shrink the table when it is only 1/8 full, and we ensure that we grow the table when it is 2/3 full. (The growth will start by at minimum doubling the required size.)
Diffstat (limited to 'src/nng.h')
-rw-r--r--src/nng.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nng.h b/src/nng.h
index 335094c7..36800139 100644
--- a/src/nng.h
+++ b/src/nng.h
@@ -363,6 +363,7 @@ NNG_DECL int nng_device(nng_socket *, nng_socket *);
#define NNG_ENOTSUP (-9)
#define NNG_EADDRINUSE (-10)
#define NNG_ESTATE (-11)
+#define NNG_ENOENT (-12)
// Maximum length of a socket address. This includes the terminating NUL.
// This limit is built into other implementations, so do not change it.