1 /* Copyright (c) 2012. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef BITTORRENT_BITTORRENT_H_
8 #define BITTORRENT_BITTORRENT_H_
13 #define MAILBOX_SIZE 40
15 * Mailbox used to communicate with the tracker.
17 #define TRACKER_MAILBOX "tracker_mailbox"
19 * Max number of pairs sent by the tracker to clients
21 #define MAXIMUM_PAIRS 50
23 * Interval of time where the peer should send a request to the tracker
25 #define TRACKER_QUERY_INTERVAL 1000
27 * Communication size for a task to the tracker
29 #define TRACKER_COMM_SIZE 0.01
31 * Timeout for the get peers data
33 #define GET_PEERS_TIMEOUT 10000
35 * Timeout for "standard" messages.
37 #define TIMEOUT_MESSAGE 10
39 * Timeout for tracker receive.
41 #define TRACKER_RECEIVE_TIMEOUT 10
43 * Number of peers that can be unchocked at a given time
45 #define MAX_UNCHOKED_PEERS 4
48 * Interval between each update of the choked peers
50 #define UPDATE_CHOKED_INTERVAL 30
53 * Number of pieces the peer asks for simultaneously
56 #endif /* BITTORRENT_BITTORRENT_H_ */