~ubuntu-branches/ubuntu/raring/simgrid/raring

« back to all changes in this revision

Viewing changes to examples/msg/bittorrent/bittorrent.h

  • Committer: Package Import Robot
  • Author(s): Martin Quinson
  • Date: 2013-01-31 00:24:51 UTC
  • mfrom: (10.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20130131002451-krejhf7w7h24lpsc
Tags: 3.9~rc1-1
* New upstream release: the "Grasgory" release. Major changes:
  - Gras was completely removed from this version.
  - Documentation reorganization to ease browsing it.
  - New default value for the TCP_gamma parameter: 4MiB

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (c) 2012. 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
#endif                          /* BITTORRENT_BITTORRENT_H_ */