X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0f123dd4d0d60d0c57bcae6f3629c83e32549b39..1c344d71e53430eca582bdcd56655ba9f078e901:/examples/msg/bittorrent/bittorrent.h diff --git a/examples/msg/bittorrent/bittorrent.h b/examples/msg/bittorrent/bittorrent.h index 7a81709744..b45d688a4c 100644 --- a/examples/msg/bittorrent/bittorrent.h +++ b/examples/msg/bittorrent/bittorrent.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2012. The SimGrid Team. +/* Copyright (c) 2012-2014, 2016. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -6,65 +6,23 @@ #ifndef BITTORRENT_BITTORRENT_H_ #define BITTORRENT_BITTORRENT_H_ -//TODO: Let users change this -/* - * File transfered data - */ -static int FILE_SIZE = 5120; -static int FILE_PIECE_SIZE = 512; -static int FILE_PIECES = 10; -static int PIECES_BLOCKS = 5; -static int BLOCKS_REQUESTED = 2; - -static int PIECE_COMM_SIZE = 1; -/** - * Information message size - */ -#define MESSAGE_SIZE 1 - - -#define MAILBOX_SIZE 40 /* Size of mailboxes */ -/** - * Mailbox used to communicate with the tracker. - */ +#define MAILBOX_SIZE 40 #define TRACKER_MAILBOX "tracker_mailbox" -/** - * Max number of pairs sent by the tracker to clients - */ +/** Max number of pairs sent by the tracker to clients */ #define MAXIMUM_PAIRS 50 -/** - * Interval of time where the peer should send a request to the tracker - */ +/** Interval of time where the peer should send a request to the tracker */ #define TRACKER_QUERY_INTERVAL 1000 -/** - * Communication size for a task to the tracker - */ +/** Communication size for a task to the tracker */ #define TRACKER_COMM_SIZE 0.01 -/** - * Timeout for the get peers data - */ #define GET_PEERS_TIMEOUT 10000 -/** - * Timeout for "standard" messages. - */ #define TIMEOUT_MESSAGE 10 -/** - * Timeout for tracker receive. - */ #define TRACKER_RECEIVE_TIMEOUT 10 -/** - * Number of peers that can be unchocked at a given time - */ +/** Number of peers that can be unchocked at a given time */ #define MAX_UNCHOKED_PEERS 4 - -/** - * Interval between each update of the choked peers - */ +/** Interval between each update of the choked peers */ #define UPDATE_CHOKED_INTERVAL 30 - -/** - * Number of pieces the peer asks for simultaneously - */ +/** Number of pieces the peer asks for simultaneously */ #define MAX_PIECES 1 -#endif /* BITTORRENT_BITTORRENT_H_ */ + +#endif /* BITTORRENT_BITTORRENT_H_ */