Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:simgrid/simgrid into s_type_cleanup
[simgrid.git] / teshsuite / msg / app-bittorrent / bittorrent.h
1 /* Copyright (c) 2012-2014, 2016-2017. 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 #define MAILBOX_SIZE 40
11 #define TRACKER_MAILBOX "tracker_mailbox"
12 /** Max number of pairs sent by the tracker to clients */
13 #define MAXIMUM_PEERS 50
14 /** Interval of time where the peer should send a request to the tracker */
15 #define TRACKER_QUERY_INTERVAL 1000
16 /** Communication size for a task to the tracker */
17 #define TRACKER_COMM_SIZE 1
18 #define GET_PEERS_TIMEOUT 10000
19 #define TIMEOUT_MESSAGE 10
20 #define TRACKER_RECEIVE_TIMEOUT 10
21 /** Number of peers that can be unchocked at a given time */
22 #define MAX_UNCHOKED_PEERS 4
23 /** Interval between each update of the choked peers */
24 #define UPDATE_CHOKED_INTERVAL 30
25 /** Number of pieces the peer asks for simultaneously */
26 #define MAX_PIECES 1
27
28 #endif /* BITTORRENT_BITTORRENT_H_ */