1
0
mirror of https://github.com/veggiedefender/torrent-client.git synced 2025-11-06 09:29:16 +02:00

Caveat that Download stores the file in memory

This commit is contained in:
Jesse Li
2020-01-02 10:51:13 -05:00
parent 22fc59dae3
commit 873008bb96

View File

@@ -188,7 +188,7 @@ func calculateBoundsForPiece(index, numPieces, length int) (begin int, end int)
return begin, end return begin, end
} }
// Download downloads the torrent // Download downloads the torrent. This stores the entire file in memory.
func (t *Torrent) Download() ([]byte, error) { func (t *Torrent) Download() ([]byte, error) {
log.Println("Starting download for", t.Name) log.Println("Starting download for", t.Name)
// Init queues for workers to retrieve work and send results // Init queues for workers to retrieve work and send results