simple-socket library 1.5.0
Loading...
Searching...
No Matches
NET::SockAddress Class Reference

Public Member Functions

 SockAddress (AddressFamily family, std::string_view address, unsigned short port)
 SockAddress (AddressFamily family, unsigned short port)
 SockAddress (std::string_view path)
sockaddr * data () noexcept
const sockaddr * data () const noexcept
socklen_t length () const noexcept
sa_family_t family () const noexcept
bool empty () const noexcept
socklen_t * lengthPtr () noexcept
unsigned short port () const noexcept
std::string address () const

Static Public Member Functions

static sa_family_t nativeFamily (AddressFamily family) noexcept

Detailed Description

Definition at line 14 of file SockAddress.h.

Constructor & Destructor Documentation

◆ SockAddress() [1/3]

SockAddress::SockAddress ( AddressFamily family,
std::string_view address,
unsigned short port )

Definition at line 39 of file SockAddress.cpp.

◆ SockAddress() [2/3]

SockAddress::SockAddress ( AddressFamily family,
unsigned short port )

Definition at line 72 of file SockAddress.cpp.

◆ SockAddress() [3/3]

SockAddress::SockAddress ( std::string_view path)
explicit

Definition at line 99 of file SockAddress.cpp.

Member Function Documentation

◆ address()

std::string SockAddress::address ( ) const

Definition at line 173 of file SockAddress.cpp.

◆ data() [1/2]

const sockaddr * SockAddress::data ( ) const
noexcept

Definition at line 125 of file SockAddress.cpp.

◆ data() [2/2]

sockaddr * SockAddress::data ( )
noexcept

Definition at line 120 of file SockAddress.cpp.

◆ empty()

bool SockAddress::empty ( ) const
noexcept

Definition at line 140 of file SockAddress.cpp.

◆ family()

sa_family_t SockAddress::family ( ) const
noexcept

Definition at line 135 of file SockAddress.cpp.

◆ length()

socklen_t SockAddress::length ( ) const
noexcept

Definition at line 130 of file SockAddress.cpp.

◆ lengthPtr()

socklen_t * SockAddress::lengthPtr ( )
noexcept

Definition at line 145 of file SockAddress.cpp.

◆ nativeFamily()

sa_family_t SockAddress::nativeFamily ( AddressFamily family)
staticnoexcept

Definition at line 226 of file SockAddress.cpp.

◆ port()

unsigned short SockAddress::port ( ) const
noexcept

Definition at line 152 of file SockAddress.cpp.


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