make max transfers configurable

This commit is contained in:
2023-01-17 20:52:03 +01:00
parent 92dcc81731
commit 2f1bb3fac2
8 changed files with 27 additions and 10 deletions

View File

@@ -11,6 +11,7 @@ namespace States {
SHA1::SHA1(
ToxClient& tcl,
const CommandLine& cl,
mio::mmap_sink&& file_map,
const FTInfoSHA1&& sha1_info,
const std::vector<uint8_t>&& sha1_info_data,
@@ -27,6 +28,9 @@ SHA1::SHA1(
{
assert(_have_chunk.size() == _sha1_info.chunks.size());
_max_concurrent_in = cl.max_incoming_transfers;
_max_concurrent_out = cl.max_incoming_transfers;
_have_all = true;
_have_count = 0;
for (size_t i = 0; i < _have_chunk.size(); i++) {