Clients can now see download progress of large resources

This commit is contained in:
Yousef Khadadeh 2025-10-09 21:02:19 +03:00
parent 2a213028c0
commit 3b12f630f8
11 changed files with 87 additions and 30 deletions

View file

@ -93,6 +93,13 @@ void NetClient::parse_received_messages() {
}
}
std::pair<uint64_t, uint64_t> NetClient::get_progress_into_fragmented_message(const std::string& channel) {
auto& m = pfm[channel];
if(m.partialFragmentMessage.empty())
return {0, 0};
return {m.partialFragmentMessageLoc, m.partialFragmentMessage.size()};
}
void NetClient::send_queued_messages() {
for(auto& [channelName, messageQueue] : messageQueues) {
bool addMessageOrder = NetLibrary::is_ordered_channel(channelName);