Generic BSD sockaddr
storage.
More...
#include <senf/Socket/Protocols/BSDSocketAddress.hh>
Structors and default members | |
GenericBSDSocketAddress () | |
GenericBSDSocketAddress (BSDSocketAddress const &other) | |
GenericBSDSocketAddress & | operator= (const BSDSocketAddress &other) |
GenericBSDSocketAddress (const GenericBSDSocketAddress &other) | |
GenericBSDSocketAddress & | operator= (const GenericBSDSocketAddress &other) |
Generic sockaddr interface | |
struct sockaddr const * | sockaddr_p () const |
struct sockaddr * | sockaddr_p () |
Additional Inherited Members | |
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 |
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) | |
BSDSocketAddress & | operator= (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_base & | operator= (const safe_bool_base &) |
~safe_bool_base () | |
Related Functions inherited from senf::BSDSocketAddress | |
template<class Target > | |
Target & | sockaddr_cast (BSDSocketAddress &source) |
Safe socket address down-cast. More... | |
template<class Target > | |
Target const & | sockaddr_cast (BSDSocketAddress const &source) |
Safe socket address down-cast (const) More... | |
std::ostream & | operator<< (std::ostream &os, BSDSocketAddress const &addr) |
Output generic socket address. More... | |
Generic BSD sockaddr
storage.
While BSDSocketAddress provides read-only generic sockaddr
access, GenericBSDSocketAddress allows to store (write) arbitrary socket addresses. (It is internally based on sockaddr_storage
).
To access the stored address, use sockaddr_cast to cast the GenericBSDSocketAddress to the correct family specific address class.
Definition at line 163 of file BSDSocketAddress.hh.
senf::GenericBSDSocketAddress::GenericBSDSocketAddress | ( | ) |
senf::GenericBSDSocketAddress::GenericBSDSocketAddress | ( | BSDSocketAddress const & | other | ) |
senf::GenericBSDSocketAddress::GenericBSDSocketAddress | ( | const GenericBSDSocketAddress & | other | ) |
GenericBSDSocketAddress& senf::GenericBSDSocketAddress::operator= | ( | const BSDSocketAddress & | other | ) |
GenericBSDSocketAddress& senf::GenericBSDSocketAddress::operator= | ( | const GenericBSDSocketAddress & | other | ) |
struct sockaddr const* senf::GenericBSDSocketAddress::sockaddr_p | ( | ) | const |
struct sockaddr* senf::GenericBSDSocketAddress::sockaddr_p | ( | ) |