Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dig through git history, and update copyright lines.
[simgrid.git] / examples / msg / bittorrent / bittorrent.h
1 /* Copyright (c) 2012-2013. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #ifndef BITTORRENT_BITTORRENT_H_
8 #define BITTORRENT_BITTORRENT_H_
9
10 /**
11  * Size of mailboxes
12  */
13 #define MAILBOX_SIZE 40
14 /**
15  * Mailbox used to communicate with the tracker.
16  */
17 #define TRACKER_MAILBOX "tracker_mailbox"
18 /**
19  * Max number of pairs sent by the tracker to clients
20  */
21 #define MAXIMUM_PAIRS 50
22 /**
23  * Interval of time where the peer should send a request to the tracker
24  */
25 #define TRACKER_QUERY_INTERVAL 1000
26 /**
27  * Communication size for a task to the tracker
28  */
29 #define TRACKER_COMM_SIZE 0.01
30 /**
31  * Timeout for the get peers data
32  */
33 #define GET_PEERS_TIMEOUT 10000
34 /**
35  * Timeout for "standard" messages.
36  */
37 #define TIMEOUT_MESSAGE 10
38 /**
39  * Timeout for tracker receive.
40  */
41 #define TRACKER_RECEIVE_TIMEOUT 10
42 /**
43  * Number of peers that can be unchocked at a given time
44  */
45 #define MAX_UNCHOKED_PEERS 4
46
47 /**
48  * Interval between each update of the choked peers
49  */
50 #define UPDATE_CHOKED_INTERVAL 30
51
52 /**
53  * Number of pieces the peer asks for simultaneously
54  */
55 #define MAX_PIECES 1
56
57 #endif                          /* BITTORRENT_BITTORRENT_H_ */