MySQL 8.3.0
Source Code Documentation
mysql_harness::TCPAddress Class Reference

Defines an IP address with port number
More...

#include <tcp_address.h>

Public Member Functions

 TCPAddress ()=default
 
 TCPAddress (std::string address, uint16_t tcp_port)
 
 TCPAddress (const TCPAddress &other)=default
 
 TCPAddress (TCPAddress &&other)=default
 
TCPAddressoperator= (const TCPAddress &other)=default
 
TCPAddressoperator= (TCPAddress &&other)=default
 
std::string address () const
 
uint16_t port () const
 
void port (uint16_t p)
 
std::string str () const
 Returns the address as a string. More...
 

Private Attributes

std::string addr_
 Network name IP. More...
 
uint16_t port_ {}
 TCP port. More...
 

Friends

bool operator== (const TCPAddress &left, const TCPAddress &right)
 Compares two addresses for equality. More...
 
bool operator< (const TCPAddress &left, const TCPAddress &right)
 Function for performing comparison of TCPAddresses. More...
 

Detailed Description

Defines an IP address with port number

Constructor & Destructor Documentation

◆ TCPAddress() [1/4]

mysql_harness::TCPAddress::TCPAddress ( )
default

◆ TCPAddress() [2/4]

mysql_harness::TCPAddress::TCPAddress ( std::string  address,
uint16_t  tcp_port 
)
inline

◆ TCPAddress() [3/4]

mysql_harness::TCPAddress::TCPAddress ( const TCPAddress other)
default

◆ TCPAddress() [4/4]

mysql_harness::TCPAddress::TCPAddress ( TCPAddress &&  other)
default

Member Function Documentation

◆ address()

std::string mysql_harness::TCPAddress::address ( ) const
inline

◆ operator=() [1/2]

TCPAddress & mysql_harness::TCPAddress::operator= ( const TCPAddress other)
default

◆ operator=() [2/2]

TCPAddress & mysql_harness::TCPAddress::operator= ( TCPAddress &&  other)
default

◆ port() [1/2]

uint16_t mysql_harness::TCPAddress::port ( ) const
inline

◆ port() [2/2]

void mysql_harness::TCPAddress::port ( uint16_t  p)
inline

◆ str()

std::string mysql_harness::TCPAddress::str ( ) const

Returns the address as a string.

Returns the address as a string.

Returns
instance of std::string

Friends And Related Function Documentation

◆ operator<

bool operator< ( const TCPAddress left,
const TCPAddress right 
)
friend

Function for performing comparison of TCPAddresses.

◆ operator==

bool operator== ( const TCPAddress left,
const TCPAddress right 
)
friend

Compares two addresses for equality.

Member Data Documentation

◆ addr_

std::string mysql_harness::TCPAddress::addr_
private

Network name IP.

◆ port_

uint16_t mysql_harness::TCPAddress::port_ {}
private

TCP port.


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