fipa_services
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
fipa::services::transports::Address Class Reference

Communication address specified by IP, port, and protocol. More...

#include <Address.hpp>

Public Member Functions

 Address ()
 
 Address (const std::string &ip, uint16_t port, const std::string &protocol="udt")
 
std::string toString () const
 
bool operator== (const Address &other) const
 
bool operator!= (const Address &other) const
 
bool operator< (const Address &other) const
 

Static Public Member Functions

static Address fromString (const std::string &address)
 

Public Attributes

std::string ip
 
uint16_t port
 
std::string protocol
 

Detailed Description

Communication address specified by IP, port, and protocol.

Constructor & Destructor Documentation

◆ Address() [1/2]

fipa::services::transports::Address::Address ( )
inline

◆ Address() [2/2]

fipa::services::transports::Address::Address ( const std::string &  ip,
uint16_t  port,
const std::string &  protocol = "udt" 
)

Member Function Documentation

◆ fromString()

Address fipa::services::transports::Address::fromString ( const std::string &  address)
static

Create address from string

Returns
std::invalid_argument if address is malformatted

◆ operator!=()

bool fipa::services::transports::Address::operator!= ( const Address other) const
inline

◆ operator<()

bool fipa::services::transports::Address::operator< ( const Address other) const

Less than operator, to allow usage of this structure with std::set

Returns
true if other address is greater, false otherwise

◆ operator==()

bool fipa::services::transports::Address::operator== ( const Address other) const

Equals operator

Returns
True if equal, false otherwise

◆ toString()

std::string fipa::services::transports::Address::toString ( ) const

Convert address to string

Returns
Address as string

Member Data Documentation

◆ ip

std::string fipa::services::transports::Address::ip

◆ port

uint16_t fipa::services::transports::Address::port

◆ protocol

std::string fipa::services::transports::Address::protocol

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