Furrent
|
Represents a parsed .torrent file. More...
#include <torrent.hpp>
Public Member Functions | |
TorrentFile ()=default | |
Construct an empty TorrentFile instance. More... | |
TorrentFile (const bencode::BencodeValue &tree) | |
Public Attributes | |
std::string | announce_url |
hash::hash_t | info_hash {} |
std::vector< hash::hash_t > | piece_hashes |
SHA1 hashes, one for each piece of the shared file. More... | |
int64_t | piece_length = 0 |
The length, in bytes, of each piece. More... | |
int64_t | length = 0 |
The length, in bytes, of the entire shared file. More... | |
int64_t | pieces_count = 0 |
Total number of pieces. More... | |
std::string | name |
The name of the shared file. More... | |
std::string | folder_name |
Name of the folder containing all torrent files. More... | |
std::vector< File > | files |
Describe the structure of the file. More... | |
Represents a parsed .torrent file.
|
explicitdefault |
Construct an empty TorrentFile instance.
|
explicit |
Construct an instance of TorrentFile given a bencode::BencodeValue which is assumed to be the parsed .torrent file
std::string fur::TorrentFile::announce_url |
The URL used to announce ourselves to the tracker and fetch a list of peers
std::vector<File> fur::TorrentFile::files |
Describe the structure of the file.
std::string fur::TorrentFile::folder_name |
Name of the folder containing all torrent files.
hash::hash_t fur::TorrentFile::info_hash {} |
The SHA1 hash of the "info" dict from the decoded .torrent file. Uniquely identifies this torrent to the tracker and other peers
int64_t fur::TorrentFile::length = 0 |
The length, in bytes, of the entire shared file.
std::string fur::TorrentFile::name |
The name of the shared file.
std::vector<hash::hash_t> fur::TorrentFile::piece_hashes |
SHA1 hashes, one for each piece of the shared file.
int64_t fur::TorrentFile::piece_length = 0 |
The length, in bytes, of each piece.
int64_t fur::TorrentFile::pieces_count = 0 |
Total number of pieces.