From 4b53b1e31a93af8c739ba555970cb88d73063bce Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 29 Dec 2016 01:09:36 -0800 Subject: 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.) --- src/nng.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nng.h') 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. -- cgit v1.2.3-70-g09d2