aboutgitcodebugslistschat
path: root/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'tcp.h')
-rw-r--r--tcp.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tcp.h b/tcp.h
index 3154b4b..109516d 100644
--- a/tcp.h
+++ b/tcp.h
@@ -6,11 +6,12 @@
#ifndef TCP_H
#define TCP_H
-#define REFILL_INTERVAL 1000 /* ms */
+#define REFILL_INTERVAL 1000 /* ms */
#define PORT_DETECT_INTERVAL 1000
#define TCP_TIMER_INTERVAL MIN(REFILL_INTERVAL, PORT_DETECT_INTERVAL)
-#define TCP_MAX_CONNS (128 * 1024)
+#define TCP_CONN_INDEX_BITS 17 /* 128k */
+#define TCP_MAX_CONNS (1 << TCP_CONN_INDEX_BITS)
#define TCP_MAX_SOCKS (TCP_MAX_CONNS + USHRT_MAX * 2)
#define TCP_SOCK_POOL_SIZE 32