From dffea5da69b19c6812700839885c9997e73db7ec Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 25 Jan 2007 14:16:26 +0000 Subject: return random check back intervals to our clients --- trackerlogic.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'trackerlogic.h') diff --git a/trackerlogic.h b/trackerlogic.h index b047d7d..8a61b74 100644 --- a/trackerlogic.h +++ b/trackerlogic.h @@ -18,6 +18,14 @@ typedef ot_byte ot_hash[20]; typedef ot_dword ot_ip; typedef time_t ot_time; +/* Some tracker behaviour tunable */ +#define OT_CLIENT_TIMEOUT 30 +#define OT_CLIENT_TIMEOUT_CHECKINTERVAL 5 +#define OT_CLIENT_REQUEST_INTERVAL 1800 +#define OT_CLIENT_REQUEST_VARIATION 180 + +#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL + (int)( random( ) % OT_CLIENT_REQUEST_VARIATION ) ) + /* We maintain a list of 256 pointers to sorted list of ot_torrent structs Sort key is, of course, its hash */ -- cgit v1.2.3