mn::net::basic_ip_endpoint< TIPCLASS, TAF > Class Template Reference
This template basic class represents an ip endpoint/socket address. More...
#include <mn_basic_endpoint.hpp>
Inheritance diagram for mn::net::basic_ip_endpoint< TIPCLASS, TAF >:
Collaboration diagram for mn::net::basic_ip_endpoint< TIPCLASS, TAF >:
Public Types | |
using | ip_type = TIPCLASS |
using | self_type = basic_ip_endpoint< TIPCLASS, TAF > |
Public Member Functions | |
basic_ip_endpoint (const ip_type &ip, const uint16_t &port) noexcept | |
Construct a basic_ip_endpoint by giving ip address and port. More... | |
basic_ip_endpoint (const self_type &pOther) noexcept | |
Construct a basic_ip_endpoint by copying another one. More... | |
uint16_t | get_port () |
Get the port number. More... | |
ip_type | get_host () |
Get the host IP address. More... | |
address_family | get_famile () |
Get the address family of the address. More... | |
void | set_port (const uint16_t &port) |
Set a port number, between 0-9999. More... | |
void | set_host (const ip_type &ip) |
Set a new the host IP address. More... | |
bool | is_multicast () |
Is the host address a multicast address. More... | |
bool | is_loopback () |
Is the host address a loopaddress. More... | |
self_type & | operator= (const self_type &pOther) |
Assigns another basic_ip_endpoint. More... | |
bool | operator== (const self_type &pOther) |
Is the right basic_endpoint equel with this. More... | |
bool | operator!= (const self_type &pOther) |
Is the right basic_endpoint not equel with this. More... | |
bool | operator< (const self_type &pOther) const |
smaler as .. - odering More... | |
virtual void | swap (self_type &rhs) noexcept |
Public Member Functions inherited from mn::net::basic_endpoint | |
virtual basic_endpoint * | get_copy ()=0 |
Get a copy from this. More... | |
Protected Attributes | |
ip_type | m_ipAdress |
uint16_t | m_iPort |
Detailed Description
template<class TIPCLASS, address_family TAF>
class mn::net::basic_ip_endpoint< TIPCLASS, TAF >
This template basic class represents an ip endpoint/socket address.
- Template Parameters
-
TIPCLASS Type for the ip address class
Member Typedef Documentation
◆ ip_type
template<class TIPCLASS , address_family TAF>
using mn::net::basic_ip_endpoint< TIPCLASS, TAF >::ip_type = TIPCLASS |
◆ self_type
template<class TIPCLASS , address_family TAF>
using mn::net::basic_ip_endpoint< TIPCLASS, TAF >::self_type = basic_ip_endpoint<TIPCLASS, TAF> |
Constructor & Destructor Documentation
◆ basic_ip_endpoint() [1/2]
template<class TIPCLASS , address_family TAF>
|
inlinenoexcept |
Construct a basic_ip_endpoint by giving ip address and port.
◆ basic_ip_endpoint() [2/2]
template<class TIPCLASS , address_family TAF>
|
inlinenoexcept |
Construct a basic_ip_endpoint by copying another one.
Member Function Documentation
◆ get_famile()
template<class TIPCLASS , address_family TAF>
|
inline |
Get the address family of the address.
- Returns
- The address family of the address.
◆ get_host()
template<class TIPCLASS , address_family TAF>
|
inline |
Get the host IP address.
- Returns
- The host IP address.
◆ get_port()
template<class TIPCLASS , address_family TAF>
|
inline |
Get the port number.
- Returns
- The port number
◆ is_loopback()
template<class TIPCLASS , address_family TAF>
|
inline |
Is the host address a loopaddress.
- Returns
- If true is the host address a loopaddress address and false is not
◆ is_multicast()
template<class TIPCLASS , address_family TAF>
|
inline |
Is the host address a multicast address.
- Returns
- If true is the host address a multicast address and false is not
◆ operator!=()
template<class TIPCLASS , address_family TAF>
|
inline |
Is the right basic_endpoint not equel with this.
- Returns
- If true then this basic_endpoint not equel with the right basic_endpoint and false if equel
◆ operator<()
template<class TIPCLASS , address_family TAF>
|
inline |
smaler as .. - odering
◆ operator=()
template<class TIPCLASS , address_family TAF>
|
inline |
Assigns another basic_ip_endpoint.
◆ operator==()
template<class TIPCLASS , address_family TAF>
|
inline |
Is the right basic_endpoint equel with this.
- Returns
- If true then this basic_endpoint equel with the right basic_endpoint and false if not
◆ set_host()
template<class TIPCLASS , address_family TAF>
|
inline |
Set a new the host IP address.
- Parameters
-
ip The new host IP address to set.
◆ set_port()
template<class TIPCLASS , address_family TAF>
|
inline |
Set a port number, between 0-9999.
◆ swap()
template<class TIPCLASS , address_family TAF>
|
inlinevirtualnoexcept |
Member Data Documentation
◆ m_ipAdress
template<class TIPCLASS , address_family TAF>
|
protected |
◆ m_iPort
template<class TIPCLASS , address_family TAF>
|
protected |
The documentation for this class was generated from the following file: