E-MailRelay

Public Member Functions | List of all members
GNet::AddressStorage Class Reference

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

## Detailed Description

A helper class for calling accept(), getsockname() and getpeername() and hiding the definition of sockaddr_storage.

Definition at line 295 of file gaddress.h.

## Constructor & Destructor Documentation

## ◆ AddressStorage()

GNet::AddressStorage::AddressStorage | ( |  | ) |

Default constructor, with n() reflecting the size of the largest supported address type.

Definition at line 532 of file gaddress.cpp.

## Member Function Documentation

## ◆ n()

socklen_t GNet::AddressStorage::n | ( |  | ) | const

Returns the length, typically modified via p2().

Definition at line 564 of file gaddress.cpp.

## ◆ p()

const sockaddr * GNet::AddressStorage::p | ( |  | ) | const

Returns the pointer, typically set via p1().

Definition at line 559 of file gaddress.cpp.

## ◆ p1()

sockaddr * GNet::AddressStorage::p1 | ( |  | ) |

Returns the sockaddr pointer for accept()/getsockname()/getpeername() to write into.

Definition at line 549 of file gaddress.cpp.

## ◆ p2()

socklen_t * GNet::AddressStorage::p2 | ( |  | ) |

Returns the length pointer for accept()/getsockname()/getpeername() to write into.

Definition at line 554 of file gaddress.cpp.

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

- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gnet/gaddress.h
- /usr/src/slapt-src-x86_64/network/emailrelay/emailrelay-2.3/src/gnet/gaddress.cpp