1
0
mirror of https://github.com/asamy/ctorrent synced 2025-10-05 23:52:41 +02:00
This commit is contained in:
A. Samy
2015-11-28 18:53:09 +00:00
parent 057743b6ce
commit dc281f467e
2 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
# CTorrent # CTorrent
CTorrent is a torrent client written in C++11 with some help from Boost. CTorrent is a torrent client written in C++11 with some help from Boost.
![img](https://i.imgur.com/WcjjLG5.png)
## Requirements ## Requirements

View File

@@ -25,6 +25,7 @@
#include <thread> #include <thread>
#include <functional> #include <functional>
#include <chrono>
#include <iostream> #include <iostream>
#include <boost/program_options.hpp> #include <boost/program_options.hpp>
@@ -223,17 +224,13 @@ int main(int argc, char *argv[])
} }
if (!nodownload && started > 0) { if (!nodownload && started > 0) {
int last = 0;
while (completed != total - errors) { while (completed != total - errors) {
if (errors == total) if (errors == total)
break; break;
Connection::poll(); Connection::poll();
print_all_stats(torrents, total); print_all_stats(torrents, total);
if (last == completed) std::this_thread::sleep_for(std::chrono::milliseconds(5));
continue;
last = completed;
} }
} }
@@ -241,6 +238,7 @@ int main(int argc, char *argv[])
while (eseed != total) { while (eseed != total) {
Connection::poll(); Connection::poll();
print_all_stats(torrents, total); print_all_stats(torrents, total);
std::this_thread::sleep_for(std::chrono::milliseconds(10));
} }
} }