aboutsummaryrefslogtreecommitdiff
path: root/src/core/sockimpl.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-08-15 14:09:17 -0700
committerGarrett D'Amore <garrett@damore.org>2020-08-16 23:07:35 -0700
commit4f5e11c391c4a8f1b2731aee5ad47bc0c925042a (patch)
tree640aef66eb7e0030a2833bc9bba3246edb29d074 /src/core/sockimpl.h
parent750662d4aab305d8a3d48bfa6edfc4dac4018881 (diff)
downloadnng-4f5e11c391c4a8f1b2731aee5ad47bc0c925042a.tar.gz
nng-4f5e11c391c4a8f1b2731aee5ad47bc0c925042a.tar.bz2
nng-4f5e11c391c4a8f1b2731aee5ad47bc0c925042a.zip
fixes #1289 zerotier should have it's own copy of the id hashing code
fixes #1288 id allocation can overallocate fixes #1126 consider removing lock from idhash This substantially refactors the id hash code, giving a cleaner API, and eliminating a extra locking as well as some wasteful allocations. The ZeroTier code has it's own copy, that is 64-bit friendly, as the rest of the consumers need only a simpler 32-bit API.
Diffstat (limited to 'src/core/sockimpl.h')
-rw-r--r--src/core/sockimpl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/sockimpl.h b/src/core/sockimpl.h
index 16596c63..732e2285 100644
--- a/src/core/sockimpl.h
+++ b/src/core/sockimpl.h
@@ -50,8 +50,8 @@ struct nni_dialer {
nni_mtx d_mtx;
nni_list d_pipes;
nni_aio * d_user_aio;
- nni_aio * d_con_aio;
- nni_aio * d_tmo_aio; // backoff timer
+ nni_aio d_con_aio;
+ nni_aio d_tmo_aio; // backoff timer
nni_duration d_maxrtime; // maximum time for reconnect
nni_duration d_currtime; // current time for reconnect
nni_duration d_inirtime; // initial time for reconnect
@@ -91,8 +91,8 @@ struct nni_listener {
bool l_closing; // close started (shutdown)
nni_atomic_flag l_started;
nni_list l_pipes;
- nni_aio * l_acc_aio;
- nni_aio * l_tmo_aio;
+ nni_aio l_acc_aio;
+ nni_aio l_tmo_aio;
nni_reap_item l_reap;
nni_listener_stats l_stats;
};