| | 1 | [[libtorrentMirror]] |
| | 2 | |
| | 3 | = Resume data = |
| | 4 | |
| | 5 | Using the functions ''torrent::Download::hash_check(true)'' and |
| | 6 | ''torrent::Download::hash_resume_save()'' the client can tell the |
| | 7 | library to load and save various data that is useful when resuming a |
| | 8 | download. To ignore resume data call |
| | 9 | ''torrent::Download::hash_check(true)''. |
| | 10 | |
| | 11 | The resume data is stored in the bencoded torrent as a dictionary |
| | 12 | under the key "libtorrent resume". All the following items are within |
| | 13 | that dictionary. |
| | 14 | |
| | 15 | == Completed chunks == |
| | 16 | |
| | 17 | When resuming the library will skip hash checking for chunk ranges |
| | 18 | that have valid resume data. The file modification time-stamp is |
| | 19 | stored with the resume data, and ranges containing files whose stored |
| | 20 | time-stamp does not exactly match what is on the disk it will be |
| | 21 | invalidated. If the file size does not match it will also invalidate |
| | 22 | the range. |
| | 23 | |
| | 24 | == Peer addresses == |
| | 25 | |
| | 26 | Peer addresses that are contained in torrent::AvailableList will be |
| | 27 | saved, which will includes connected peers as their addresses are |
| | 28 | copied over when a torrent is stopped. |
| | 29 | |
| | 30 | == Files == |
| | 31 | |
| | 32 | Various file related information is stored in a list under the key |
| | 33 | "files". This list exactly matches the file list in the original |
| | 34 | torrent. |
| | 35 | |
| | 36 | * ''mtime'': File modification time-stamp as an integer. |
| | 37 | * ''priority'': The file priority as an integer between [0,3>. |