bandwidth request block size optimization

This commit is contained in:
Arvid Norberg
2008-01-07 04:47:20 +00:00
parent 2ea40a51a9
commit 1d6e0f5bf6
8 changed files with 62 additions and 12 deletions

View File

@@ -155,6 +155,10 @@ namespace libtorrent
// number of bytes this peer has in
// the disk write queue
int pending_disk_bytes;
// numbers used for bandwidth limiting
int send_quota;
int receive_quota;
};
}

View File

@@ -234,12 +234,11 @@ namespace libtorrent
void request_bandwidth(int channel
, boost::intrusive_ptr<peer_connection> const& p
, bool non_prioritized);
, bool non_prioritized, int max_block_size);
void perform_bandwidth_request(int channel
, boost::intrusive_ptr<peer_connection> const& p
, int block_size
, bool non_prioritized);
, int block_size, bool non_prioritized);
void expire_bandwidth(int channel, int amount);
void assign_bandwidth(int channel, int amount, int blk);