Unix domain socket address. More...

#include <senf/Socket/Protocols/UN/UNAddressing.hh>

Inheritance diagram for senf::UNSocketAddress:

Public Member Functions

 UNSocketAddress ()
 
 UNSocketAddress (std::string const &path)
 Construct an address constant from given path. More...
 
 UNSocketAddress (const UNSocketAddress &other)
 
UNSocketAddressoperator= (const UNSocketAddress &other)
 
std::string path () const
 Return path as string. More...
 
void path (std::string const &path)
 
- Public Member Functions inherited from senf::BSDSocketAddress
bool operator== (BSDSocketAddress const &other) const
 Compare two arbitrary addresses. More...
 
bool operator< (BSDSocketAddress const &other) const
 Compare two arbitrary addresses. More...
 
bool boolean_test () const
 Return true, if address is not empty. More...
 
short family () const
 Return the address family. More...
 
struct sockaddr const * sockaddr_p () const
 
socklen_t socklen () const
 
socklen_t const * socklen_p () const
 
- Public Member Functions inherited from senf::comparable_safe_bool< BSDSocketAddress >
 operator bool_type () const
 
bool operator! () const
 

Static Public Attributes

static short const addressFamily = AF_UNIX
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &os, UNSocketAddress const &addr)
 Write path to os. More...
 

Additional Inherited Members

- Protected Types inherited from senf::safe_bool_base
typedef void(safe_bool_base::* bool_type) () const
 
- Protected Member Functions inherited from senf::BSDSocketAddress
 BSDSocketAddress (socklen_t len, short family)
 
 BSDSocketAddress (BSDSocketAddress const &other)
 
BSDSocketAddressoperator= (BSDSocketAddress const &other)
 
struct sockaddr * sockaddr_p ()
 
socklen_t * socklen_p ()
 
void socklen (socklen_t len)
 
- Protected Member Functions inherited from senf::comparable_safe_bool< BSDSocketAddress >
 ~comparable_safe_bool ()
 
- Protected Member Functions inherited from senf::safe_bool_base
void this_type_does_not_support_comparisons () const
 
 safe_bool_base ()
 
 safe_bool_base (const safe_bool_base &)
 
safe_bool_baseoperator= (const safe_bool_base &)
 
 ~safe_bool_base ()
 

Detailed Description

Unix domain socket address.

UNSocketAddress wraps the standard sockaddr_un datatype. It provides simple accessor methods to access the path.

Implementation note:
This implementation is based on sockaddr_un.

Definition at line 41 of file UNAddressing.hh.

Constructor & Destructor Documentation

◆ UNSocketAddress() [1/3]

senf::UNSocketAddress::UNSocketAddress ( )

◆ UNSocketAddress() [2/3]

senf::UNSocketAddress::UNSocketAddress ( std::string const &  path)
explicit

Construct an address constant from given path.

◆ UNSocketAddress() [3/3]

senf::UNSocketAddress::UNSocketAddress ( const UNSocketAddress other)

Member Function Documentation

◆ operator=()

UNSocketAddress& senf::UNSocketAddress::operator= ( const UNSocketAddress other)

◆ path() [1/2]

std::string senf::UNSocketAddress::path ( ) const

Return path as string.

◆ path() [2/2]

void senf::UNSocketAddress::path ( std::string const &  path)

Definition at line 26 of file UNAddressing.cc.

Friends And Related Function Documentation

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
UNSocketAddress const &  addr 
)
related

Write path to os.

Member Data Documentation

◆ addressFamily

short const senf::UNSocketAddress::addressFamily = AF_UNIX
static

Definition at line 45 of file UNAddressing.hh.


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