(libT) reduce the scope of REQUEST_BUF_SECS from peer-common.h to peer-msgs.c

This commit is contained in:
Jordan Lee 2013-02-03 23:29:34 +00:00
parent f370a76c57
commit 5475e1507e
2 changed files with 10 additions and 14 deletions

View File

@ -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. */

View File

@ -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,