Furrent
Public Member Functions | Public Attributes | List of all members
fur::peer::Peer Struct Reference

Represents a single peer as given by the tracker. More...

#include <peer.hpp>

Public Member Functions

 Peer ()
 Constructs an empty 'Peer'. More...
 
 Peer (uint32_t ip, uint16_t port)
 Constructs a Peer given an IP and a port. More...
 
 Peer (const std::string &ip, uint16_t port)
 Constructs a Peer given an IP string and a port. More...
 
std::string address () const
 

Public Attributes

uint32_t ip
 
uint16_t port
 

Detailed Description

Represents a single peer as given by the tracker.

Constructor & Destructor Documentation

◆ Peer() [1/3]

fur::peer::Peer::Peer ( )
explicit

Constructs an empty 'Peer'.

◆ Peer() [2/3]

fur::peer::Peer::Peer ( uint32_t  ip,
uint16_t  port 
)

Constructs a Peer given an IP and a port.

◆ Peer() [3/3]

fur::peer::Peer::Peer ( const std::string &  ip,
uint16_t  port 
)

Constructs a Peer given an IP string and a port.

Member Function Documentation

◆ address()

std::string fur::peer::Peer::address ( ) const

Combines the ip and port of the peer into a X.Y.Z.W:PORT string

Returns
The combined string

Member Data Documentation

◆ ip

uint32_t fur::peer::Peer::ip

◆ port

uint16_t fur::peer::Peer::port

The documentation for this struct was generated from the following files: