forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
1a198769cf
commit
268d96020e
|
@ -252,9 +252,6 @@ namespace libtorrent
|
||||||
bool support_extensions() const
|
bool support_extensions() const
|
||||||
{ return m_supports_extensions; }
|
{ return m_supports_extensions; }
|
||||||
|
|
||||||
const boost::posix_time::time_duration& last_piece_time() const
|
|
||||||
{ return m_last_piece_time; }
|
|
||||||
|
|
||||||
// a connection is local if it was initiated by us.
|
// a connection is local if it was initiated by us.
|
||||||
// if it was an incoming connection, it is remote
|
// if it was an incoming connection, it is remote
|
||||||
bool is_local() const
|
bool is_local() const
|
||||||
|
@ -523,10 +520,6 @@ namespace libtorrent
|
||||||
// message from this peer
|
// message from this peer
|
||||||
boost::posix_time::ptime m_last_piece;
|
boost::posix_time::ptime m_last_piece;
|
||||||
|
|
||||||
// the time it took for the peer to send the piece
|
|
||||||
// message
|
|
||||||
boost::posix_time::time_duration m_last_piece_time;
|
|
||||||
|
|
||||||
// this is true if this connection has been added
|
// this is true if this connection has been added
|
||||||
// to the list of connections that will be closed.
|
// to the list of connections that will be closed.
|
||||||
bool m_disconnecting;
|
bool m_disconnecting;
|
||||||
|
|
|
@ -106,7 +106,6 @@ namespace libtorrent
|
||||||
, m_trust_points(0)
|
, m_trust_points(0)
|
||||||
, m_num_invalid_requests(0)
|
, m_num_invalid_requests(0)
|
||||||
, m_last_piece(boost::posix_time::second_clock::local_time())
|
, m_last_piece(boost::posix_time::second_clock::local_time())
|
||||||
, m_last_piece_time(boost::posix_time::seconds(0))
|
|
||||||
, m_disconnecting(false)
|
, m_disconnecting(false)
|
||||||
, m_became_uninterested(boost::posix_time::second_clock::local_time())
|
, m_became_uninterested(boost::posix_time::second_clock::local_time())
|
||||||
, m_became_uninteresting(boost::posix_time::second_clock::local_time())
|
, m_became_uninteresting(boost::posix_time::second_clock::local_time())
|
||||||
|
@ -171,7 +170,6 @@ namespace libtorrent
|
||||||
, m_trust_points(0)
|
, m_trust_points(0)
|
||||||
, m_num_invalid_requests(0)
|
, m_num_invalid_requests(0)
|
||||||
, m_last_piece(boost::posix_time::second_clock::local_time())
|
, m_last_piece(boost::posix_time::second_clock::local_time())
|
||||||
, m_last_piece_time(boost::posix_time::seconds(0))
|
|
||||||
, m_disconnecting(false)
|
, m_disconnecting(false)
|
||||||
, m_became_uninterested(boost::posix_time::second_clock::local_time())
|
, m_became_uninterested(boost::posix_time::second_clock::local_time())
|
||||||
, m_became_uninteresting(boost::posix_time::second_clock::local_time())
|
, m_became_uninteresting(boost::posix_time::second_clock::local_time())
|
||||||
|
@ -647,9 +645,6 @@ namespace libtorrent
|
||||||
|
|
||||||
if (m_recv_pos < m_packet_size) return;
|
if (m_recv_pos < m_packet_size) return;
|
||||||
|
|
||||||
m_last_piece_time = m_last_piece
|
|
||||||
- boost::posix_time::second_clock::local_time();
|
|
||||||
|
|
||||||
const char* ptr = &m_recv_buffer[1];
|
const char* ptr = &m_recv_buffer[1];
|
||||||
peer_request p;
|
peer_request p;
|
||||||
p.piece = detail::read_int32(ptr);
|
p.piece = detail::read_int32(ptr);
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace
|
||||||
{
|
{
|
||||||
// the limits of the download queue size
|
// the limits of the download queue size
|
||||||
max_request_queue = 16,
|
max_request_queue = 16,
|
||||||
min_request_queue = 4,
|
min_request_queue = 2,
|
||||||
|
|
||||||
// the amount of free upload allowed before
|
// the amount of free upload allowed before
|
||||||
// the peer is choked
|
// the peer is choked
|
||||||
|
@ -157,6 +157,8 @@ namespace
|
||||||
// (then we can cancel those and request them
|
// (then we can cancel those and request them
|
||||||
// from this peer instead)
|
// from this peer instead)
|
||||||
|
|
||||||
|
while (num_requests > 0)
|
||||||
|
{
|
||||||
peer_connection* peer = 0;
|
peer_connection* peer = 0;
|
||||||
float min_weight = std::numeric_limits<float>::max();
|
float min_weight = std::numeric_limits<float>::max();
|
||||||
// find the peer with the lowest download
|
// find the peer with the lowest download
|
||||||
|
@ -230,6 +232,7 @@ namespace
|
||||||
|
|
||||||
num_requests--;
|
num_requests--;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
size_type collect_free_download(
|
size_type collect_free_download(
|
||||||
|
|
Loading…
Reference in New Issue