summaryrefslogtreecommitdiff
path: root/trackerlogic.h
diff options
context:
space:
mode:
authorerdgeist <>2007-01-25 14:16:26 +0000
committererdgeist <>2007-01-25 14:16:26 +0000
commitdffea5da69b19c6812700839885c9997e73db7ec (patch)
treeb437d73856aa62608dc6cc35dd6f7b94b888e543 /trackerlogic.h
parent2f0658a3afa65847c11612bd28a65c8c9cbc8725 (diff)
return random check back intervals to our clients
Diffstat (limited to 'trackerlogic.h')
-rw-r--r--trackerlogic.h8
1 files changed, 8 insertions, 0 deletions
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];
18typedef ot_dword ot_ip; 18typedef ot_dword ot_ip;
19typedef time_t ot_time; 19typedef time_t ot_time;
20 20
21/* Some tracker behaviour tunable */
22#define OT_CLIENT_TIMEOUT 30
23#define OT_CLIENT_TIMEOUT_CHECKINTERVAL 5
24#define OT_CLIENT_REQUEST_INTERVAL 1800
25#define OT_CLIENT_REQUEST_VARIATION 180
26
27#define OT_CLIENT_REQUEST_INTERVAL_RANDOM ( OT_CLIENT_REQUEST_INTERVAL + (int)( random( ) % OT_CLIENT_REQUEST_VARIATION ) )
28
21/* We maintain a list of 256 pointers to sorted list of ot_torrent structs 29/* We maintain a list of 256 pointers to sorted list of ot_torrent structs
22 Sort key is, of course, its hash */ 30 Sort key is, of course, its hash */
23 31