Open Lighting Architecture: ola::plugin::sandnet::IPV4SocketAddress Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ola::plugin::sandnet::IPV4SocketAddress Class Reference

## Detailed Description

An IPv4 SocketAddress.

Wraps a sockaddr_in.

Inheritance diagram for ola::plugin::sandnet::IPV4SocketAddress:

## Public Member Functions
| IPV4SocketAddress (const IPV4Address &host, uint16_t port)
| IPV4SocketAddress (const IPV4SocketAddress &other)
IPV4SocketAddress & | operator= (const IPV4SocketAddress &other)
bool | operator== (const IPV4SocketAddress &other) const
bool | operator!= (const IPV4SocketAddress &other) const
bool | operator< (const IPV4SocketAddress &other) const
| Less than operator for partial ordering.
bool | operator> (const IPV4SocketAddress &other) const
| Greater than operator.
uint16_t | Family () const
const IPV4Address & | Host () const
void | Host (const IPV4Address &host)
uint16_t | Port () const
void | Port (uint16_t port)
std::string | ToString () const
bool | ToSockAddr (struct sockaddr *addr, unsigned int size) const

## Static Public Member Functions
static bool | FromString (const std::string &str, IPV4SocketAddress *socket_address)
static IPV4SocketAddress | FromStringOrDie (const std::string &address)

## Member Function Documentation

## ◆ Family()

uint16_t ola::network::IPV4SocketAddress::Family | ( |  | ) | const
| inlinevirtual

Implements ola::network::SocketAddress.

## ◆ FromString()

bool ola::network::IPV4SocketAddress::FromString | ( | const std::string & | str,
|  | IPV4SocketAddress * | socket_address )
| static

Extract a IPV4SocketAddress from a string.

## ◆ operator<()

bool ola::network::IPV4SocketAddress::operator< | ( | const IPV4SocketAddress & | other | ) | const
| inline

Less than operator for partial ordering.

Sorts by host, then port.

## ◆ operator>()

bool ola::network::IPV4SocketAddress::operator> | ( | const IPV4SocketAddress & | other | ) | const
| inline

Greater than operator.

Sorts by host, then port.

## ◆ ToSockAddr()

bool ola::network::IPV4SocketAddress::ToSockAddr | ( | struct sockaddr * | addr,
|  | unsigned int | size ) const
| virtual

Copy this IPV4SocketAddress into a sockaddr.

Implements ola::network::SocketAddress.

## ◆ ToString()

string ola::network::IPV4SocketAddress::ToString | ( |  | ) | const
| virtual

Implements ola::network::SocketAddress.

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

- include/ola/network/SocketAddress.h
- common/network/SocketAddress.cpp