From 45e823d27ca83bf893e69c692ef9a842c97e5ffe Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Thu, 20 Mar 2014 18:49:33 -0700 Subject: Reworking of paths in Peer work-in-progress, and TCP connect support in SocketManager. Also add FD_SETSIZE checking for the default select implementation of sockets. --- node/Constants.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'node/Constants.hpp') diff --git a/node/Constants.hpp b/node/Constants.hpp index 58265bcd..27d80ed6 100644 --- a/node/Constants.hpp +++ b/node/Constants.hpp @@ -297,12 +297,17 @@ error_no_byte_order_defined; * * A link that hasn't spoken in this long is simply considered inactive. */ -#define ZT_PEER_LINK_ACTIVITY_TIMEOUT ((ZT_PEER_DIRECT_PING_DELAY * 2) + 1000) +#define ZT_PEER_PATH_ACTIVITY_TIMEOUT ((ZT_PEER_DIRECT_PING_DELAY * 2) + 1000) /** * Close TCP tunnels if unused for this long */ -#define ZT_TCP_TUNNEL_ACTIVITY_TIMEOUT ZT_PEER_LINK_ACTIVITY_TIMEOUT +#define ZT_TCP_TUNNEL_ACTIVITY_TIMEOUT ZT_PEER_PATH_ACTIVITY_TIMEOUT + +/** + * Try TCP tunnels if no response to UDP PINGs in this many milliseconds + */ +#define ZT_TCP_FALLBACK_AFTER 5000 /** * Stop relaying via peers that have not responded to direct sends in this long -- cgit v1.2.3