Avoid holding encoded resume data in memory

Now it the encoded resume data will be streamed to file instead of a
temporary buffer holding the whole of it.
This commit is contained in:
Chocobo1 2020-04-04 12:50:11 +08:00
commit d8401c76f5
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
5 changed files with 44 additions and 18 deletions

View file

@ -30,6 +30,7 @@
#ifndef BITTORRENT_SESSION_H
#define BITTORRENT_SESSION_H
#include <memory>
#include <vector>
#include <libtorrent/fwd.hpp>
@ -459,7 +460,7 @@ namespace BitTorrent
void handleTorrentTrackersChanged(TorrentHandle *const torrent);
void handleTorrentUrlSeedsAdded(TorrentHandle *const torrent, const QVector<QUrl> &newUrlSeeds);
void handleTorrentUrlSeedsRemoved(TorrentHandle *const torrent, const QVector<QUrl> &urlSeeds);
void handleTorrentResumeDataReady(TorrentHandle *const torrent, const lt::entry &data);
void handleTorrentResumeDataReady(TorrentHandle *const torrent, const std::shared_ptr<lt::entry> &data);
void handleTorrentResumeDataFailed(TorrentHandle *const torrent);
void handleTorrentTrackerReply(TorrentHandle *const torrent, const QString &trackerUrl);
void handleTorrentTrackerWarning(TorrentHandle *const torrent, const QString &trackerUrl);