E-MailRelay
|
A helper class for calling accept(), getsockname() and getpeername() and hiding the definition of sockaddr_storage. More...
#include <gaddress.h>
Public Member Functions | |
AddressStorage () | |
Default constructor, with n() reflecting the size of the largest supported address type. More... | |
~AddressStorage () | |
Destructor. | |
sockaddr * | p1 () |
Returns the sockaddr pointer for accept()/getsockname()/getpeername() to write into. More... | |
socklen_t * | p2 () |
Returns the length pointer for accept()/getsockname()/getpeername() to write into. More... | |
const sockaddr * | p () const |
Returns the pointer, typically set via p1(). More... | |
socklen_t | n () const |
Returns the length, typically modified via p2(). More... | |
AddressStorage (const AddressStorage &)=delete | |
AddressStorage (AddressStorage &&)=delete | |
void | operator= (const AddressStorage &)=delete |
void | operator= (AddressStorage &&)=delete |
A helper class for calling accept(), getsockname() and getpeername() and hiding the definition of sockaddr_storage.
Definition at line 295 of file gaddress.h.
GNet::AddressStorage::AddressStorage | ( | ) |
Default constructor, with n() reflecting the size of the largest supported address type.
Definition at line 532 of file gaddress.cpp.
socklen_t GNet::AddressStorage::n | ( | ) | const |
Returns the length, typically modified via p2().
Definition at line 564 of file gaddress.cpp.
const sockaddr * GNet::AddressStorage::p | ( | ) | const |
Returns the pointer, typically set via p1().
Definition at line 559 of file gaddress.cpp.
sockaddr * GNet::AddressStorage::p1 | ( | ) |
Returns the sockaddr pointer for accept()/getsockname()/getpeername() to write into.
Definition at line 549 of file gaddress.cpp.
socklen_t * GNet::AddressStorage::p2 | ( | ) |
Returns the length pointer for accept()/getsockname()/getpeername() to write into.
Definition at line 554 of file gaddress.cpp.