*** empty log message ***
This commit is contained in:
parent
80b57290c9
commit
49e19dd363
|
@ -114,6 +114,7 @@ peers in a separate fast-resume file.</li>
|
|||
send have messages to peers that already has the piece. This saves bandwidth.</li>
|
||||
<li>does not have any requirements on the piece order in a torrent that it resumes. This
|
||||
means it can resume a torrent downloaded by any client.</li>
|
||||
<li>adjusts the length of the request queue depending on download rate.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p>Functions that are yet to be implemented:</p>
|
||||
|
|
|
@ -46,6 +46,7 @@ The current state includes the following features:
|
|||
send have messages to peers that already has the piece. This saves bandwidth.
|
||||
* does not have any requirements on the piece order in a torrent that it resumes. This
|
||||
means it can resume a torrent downloaded by any client.
|
||||
* adjusts the length of the request queue depending on download rate.
|
||||
|
||||
__ http://home.elp.rr.com/tur/multitracker-spec.txt
|
||||
.. _Azureus: http://azureus.sourceforge.net
|
||||
|
|
|
@ -348,11 +348,6 @@ int main(int argc, char* argv[])
|
|||
};
|
||||
|
||||
i->get_peer_info(peers);
|
||||
float down = s.download_rate;
|
||||
float up = s.upload_rate;
|
||||
size_type total_down = s.total_download;
|
||||
size_type total_up = s.total_upload;
|
||||
int num_peers = (int)peers.size();
|
||||
|
||||
out.precision(4);
|
||||
out.width(5);
|
||||
|
@ -361,12 +356,12 @@ int main(int argc, char* argv[])
|
|||
out << progress_bar(s.progress, 49);
|
||||
out << "\n";
|
||||
out << "total downloaded: " << s.total_done << " Bytes\n";
|
||||
out << "peers: " << num_peers << " "
|
||||
<< "d:" << add_suffix(down) << "/s "
|
||||
<< "(" << add_suffix(total_down) << ") "
|
||||
<< "u:" << add_suffix(up) << "/s "
|
||||
<< "(" << add_suffix(total_up) << ") "
|
||||
<< "ratio: " << ratio(total_down, total_up) << "\n";
|
||||
out << "peers: " << (int)peers.size() << " "
|
||||
<< "d:" << add_suffix(s.download_rate) << "/s "
|
||||
<< "(" << add_suffix(s.total_download) << ") "
|
||||
<< "u:" << add_suffix(s.upload_rate) << "/s "
|
||||
<< "(" << add_suffix(s.total_upload) << ") "
|
||||
<< "ratio: " << ratio(s.total_payload_download, s.total_payload_upload) << "\n";
|
||||
|
||||
boost::posix_time::time_duration t = s.next_announce;
|
||||
out << "next announce: " << boost::posix_time::to_simple_string(t) << "\n";
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace libtorrent
|
|||
{
|
||||
boost::posix_time::time_duration d;
|
||||
d = boost::posix_time::second_clock::local_time() - m_last_receive;
|
||||
return d.seconds() > m_timeout;
|
||||
return d > boost::posix_time::seconds(m_timeout);
|
||||
}
|
||||
|
||||
// will send a keep-alive message to the peer
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace
|
|||
// matlab expression to plot:
|
||||
// x = 1:100:100000; plot(x, round(min(max(x ./ 5000 + 1.5, 2), 16)));
|
||||
|
||||
int desired_queue_size = rate / 5000.f + 1.5f;
|
||||
int desired_queue_size = static_cast<int>(rate / 5000.f + 1.5f);
|
||||
if (desired_queue_size > max_request_queue) desired_queue_size = max_request_queue;
|
||||
if (desired_queue_size < min_request_queue) desired_queue_size = min_request_queue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue