Furrent
Classes | Typedefs | Enumerations | Functions
fur::peer Namespace Reference

Classes

struct  Announce
 The response sent from the tracker when announcing. More...
 
struct  Peer
 Represents a single peer as given by the tracker. More...
 

Typedefs

using PeerResult = util::Result< Announce, PeerError >
 

Enumerations

enum  PeerError { PeerError::ParserError, PeerError::AnnounceError }
 

Functions

PeerResult parse_tracker_response (const std::string &text)
 
PeerResult announce (const TorrentFile &torrent_f)
 

Detailed Description

Contains data structures and facilities for representing and discovering BitTorrent peers

Typedef Documentation

◆ PeerResult

Enumeration Type Documentation

◆ PeerError

enum fur::peer::PeerError
strong
Enumerator
ParserError 

Generic error that comes from the BencodeParser.

AnnounceError 

Can't announce to the tracker.

Function Documentation

◆ announce()

PeerResult fur::peer::announce ( const TorrentFile torrent_f)

Announce ourselves to the tracker and get a list of peers to download the file from

◆ parse_tracker_response()

PeerResult fur::peer::parse_tracker_response ( const std::string &  text)