PeerError
Definition: peer.hpp:46
std::string address() const
Definition: peer.cpp:17
uint16_t port
Definition: peer.hpp:21
std::vector< Peer > peers
The list of peers that we can download the file from.
Definition: peer.hpp:43
Used to handle errors without using exceptions.
Definition: result.hpp:18
uint32_t ip
Definition: peer.hpp:20
int64_t interval
Definition: peer.hpp:41
Represents a single peer as given by the tracker.
Definition: peer.hpp:19
Represents a parsed .torrent file.
Definition: torrent.hpp:32
The response sent from the tracker when announcing.
Definition: peer.hpp:38
@ ParserError
Generic error that comes from the BencodeParser.
PeerResult announce(const TorrentFile &torrent_f)
Definition: peer.cpp:45
Common types used in all the project.
Definition: bencode_parser.cpp:7
Peer()
Constructs an empty 'Peer'.
Definition: peer.cpp:22
@ AnnounceError
Can't announce to the tracker.