diff options
author | erdgeist <> | 2007-01-25 14:16:26 +0000 |
---|---|---|
committer | erdgeist <> | 2007-01-25 14:16:26 +0000 |
commit | dffea5da69b19c6812700839885c9997e73db7ec (patch) | |
tree | b437d73856aa62608dc6cc35dd6f7b94b888e543 /trackerlogic.h | |
parent | 2f0658a3afa65847c11612bd28a65c8c9cbc8725 (diff) |
return random check back intervals to our clients
Diffstat (limited to 'trackerlogic.h')
-rw-r--r-- | trackerlogic.h | 8 |
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]; | |||
18 | typedef ot_dword ot_ip; | 18 | typedef ot_dword ot_ip; |
19 | typedef time_t ot_time; | 19 | typedef 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 | ||