*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-01-31 11:03:48 +00:00
parent 80b57290c9
commit 49e19dd363
5 changed files with 10 additions and 13 deletions

View File

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

View File

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

View File

@ -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";

View File

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

View File

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