MPD: SocketAddress Class Reference

MPD 0.20.18

Public Types | Public Member Functions | Static Public Member Functions
SocketAddress Class Reference

An OO wrapper for struct sockaddr. More...

`#include <SocketAddress.hxx>`

## Public Types
typedef socklen_t | size_type

## Public Member Functions
| SocketAddress ()=default
constexpr | SocketAddress (std::nullptr_t)
constexpr | SocketAddress (const struct sockaddr *_address, size_type _size)
constexpr bool | IsNull () const
const struct sockaddr * | GetAddress () const
constexpr size_type | GetSize () const
constexpr int | GetFamily () const
bool | IsDefined () const
| Does the object have a well-defined address? Check !IsNull() before calling this method. More...
gcc_pure bool | operator== (const SocketAddress other) const noexcept
bool | operator!= (const SocketAddress other) const noexcept

## Static Public Member Functions
static constexpr SocketAddress | Null ()

## Detailed Description

An OO wrapper for struct sockaddr.

Definition at line 46 of file SocketAddress.hxx.

## Member Typedef Documentation

## ◆ size_type

typedef socklen_t SocketAddress::size_type

Definition at line 51 of file SocketAddress.hxx.

## Constructor & Destructor Documentation

## ◆ SocketAddress() [1/3]

SocketAddress::SocketAddress | ( |  | ) |
| default

## ◆ SocketAddress() [2/3]

constexpr SocketAddress::SocketAddress | ( | std::nullptr_t |  | ) |
| inline

Definition at line 61 of file SocketAddress.hxx.

## ◆ SocketAddress() [3/3]

constexpr SocketAddress::SocketAddress | ( | const struct sockaddr * | _address,
|  | size_type | _size
| ) |  |
| inline

Definition at line 63 of file SocketAddress.hxx.

## Member Function Documentation

## ◆ GetAddress()

const struct sockaddr* SocketAddress::GetAddress | ( |  | ) | const
| inline

Definition at line 75 of file SocketAddress.hxx.

## ◆ GetFamily()

constexpr int SocketAddress::GetFamily | ( |  | ) | const
| inline

Definition at line 83 of file SocketAddress.hxx.

## ◆ GetSize()

constexpr size_type SocketAddress::GetSize | ( |  | ) | const
| inline

Definition at line 79 of file SocketAddress.hxx.

## ◆ IsDefined()

bool SocketAddress::IsDefined | ( |  | ) | const
| inline

Does the object have a well-defined address? Check !IsNull() before calling this method.

Definition at line 91 of file SocketAddress.hxx.

## ◆ IsNull()

constexpr bool SocketAddress::IsNull | ( |  | ) | const
| inline

Definition at line 71 of file SocketAddress.hxx.

## ◆ Null()

static constexpr SocketAddress SocketAddress::Null | ( |  | ) |
| inlinestatic

Definition at line 67 of file SocketAddress.hxx.

## ◆ operator!=()

bool SocketAddress::operator!= | ( | const SocketAddress | other | ) | const
| inlinenoexcept

Definition at line 98 of file SocketAddress.hxx.

## ◆ operator==()

gcc_pure bool SocketAddress::operator== | ( | const SocketAddress | other | ) | const
| noexcept

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

- net/SocketAddress.hxx