receiving count for peer

This commit is contained in:
Green Sky 2024-07-02 14:54:08 +02:00
parent 33560f8f8a
commit edf58b70f5
No known key found for this signature in database
2 changed files with 10 additions and 0 deletions

View File

@ -120,3 +120,12 @@ size_t ReceivingTransfers::size(void) const {
return count; return count;
} }
size_t ReceivingTransfers::sizePeer(uint64_t combined_id) const {
auto it = _data.find(combined_id);
if (it == _data.end()) {
return 0;
}
return it->second.size();
}

View File

@ -59,5 +59,6 @@ struct ReceivingTransfers {
void removePeerTransfer(uint64_t combined_id, uint8_t transfer_id); void removePeerTransfer(uint64_t combined_id, uint8_t transfer_id);
size_t size(void) const; size_t size(void) const;
size_t sizePeer(uint64_t combined_id) const;
}; };