From: Jordan Lee Date: Sun, 3 Feb 2013 23:29:34 +0000 (+0000) Subject: (libT) reduce the scope of REQUEST_BUF_SECS from peer-common.h to peer-msgs.c X-Git-Tag: 2.80~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5475e1507ed797e79ce688bd5c72aa550eb59594;p=transmission (libT) reduce the scope of REQUEST_BUF_SECS from peer-common.h to peer-msgs.c --- diff --git a/libtransmission/peer-common.h b/libtransmission/peer-common.h index 566c12877..f9a7adef0 100644 --- a/libtransmission/peer-common.h +++ b/libtransmission/peer-common.h @@ -17,27 +17,18 @@ #ifndef TR_PEER_H #define TR_PEER_H -/** - * @addtogroup peers Peers - * @{ - */ - -/** -*** Fields common to webseed and bittorrent peers -**/ - #include "transmission.h" #include "bitfield.h" #include "history.h" #include "quark.h" +/** + * @addtogroup peers Peers + * @{ + */ + enum { - /* when we're making requests from another peer, - batch them together to send enough requests to - meet our bandwidth goals for the next N seconds */ - REQUEST_BUF_SECS = 10, - /* this is the maximum size of a block request. most bittorrent clients will reject requests larger than this size. */ diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index 13aa78fe4..fcef213e6 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -90,6 +90,11 @@ enum /* how many blocks to keep prefetched per peer */ PREFETCH_SIZE = 18, + /* when we're making requests from another peer, + batch them together to send enough requests to + meet our bandwidth goals for the next N seconds */ + REQUEST_BUF_SECS = 10, + /* defined in BEP #9 */ METADATA_MSG_TYPE_REQUEST = 0, METADATA_MSG_TYPE_DATA = 1,