userver: utils::ip::AddressBase< N > Class Template Reference
Loading...
Searching...
No Matches
utils::ip::AddressBase< N > Class Template Referencefinal

#include <userver/utils/ip.hpp>

Detailed Description

template<std::size_t N>
class utils::ip::AddressBase< N >

Base class for IPv4/IPv6 addresses.

Definition at line 26 of file ip.hpp.

Public Types

using BytesType = std::array<unsigned char, N>
 

Public Member Functions

 AddressBase (const BytesType &address)
 
const BytesType & GetBytes () const noexcept
 Get the address in bytes, in network byte order.
 

Static Public Attributes

static constexpr std::size_t AddressSize = N
 

Member Typedef Documentation

◆ BytesType

template<std::size_t N>
using utils::ip::AddressBase< N >::BytesType = std::array<unsigned char, N>

Definition at line 31 of file ip.hpp.

Constructor & Destructor Documentation

◆ AddressBase() [1/2]

template<std::size_t N>
utils::ip::AddressBase< N >::AddressBase ( )
inlinenoexcept

Definition at line 33 of file ip.hpp.

◆ AddressBase() [2/2]

template<std::size_t N>
utils::ip::AddressBase< N >::AddressBase ( const BytesType & address)
inlineexplicit

Definition at line 34 of file ip.hpp.

Member Function Documentation

◆ GetBytes()

template<std::size_t N>
const BytesType & utils::ip::AddressBase< N >::GetBytes ( ) const
inlinenoexcept

Get the address in bytes, in network byte order.

Definition at line 37 of file ip.hpp.

Friends And Related Symbol Documentation

◆ operator!=

template<std::size_t N>
bool operator!= ( const AddressBase< N > & a1,
const AddressBase< N > & a2 )
friend

Definition at line 43 of file ip.hpp.

◆ operator==

template<std::size_t N>
bool operator== ( const AddressBase< N > & a1,
const AddressBase< N > & a2 )
friend

Definition at line 39 of file ip.hpp.

Member Data Documentation

◆ AddressSize

template<std::size_t N>
constexpr std::size_t utils::ip::AddressBase< N >::AddressSize = N
staticconstexpr

Definition at line 30 of file ip.hpp.


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