22#include "anch-network-export.hpp"
28#include <sys/socket.h>
61 sockaddr_storage _storage;
82 Address(const sockaddr* address, socklen_t length);
104 bool passive = false,
105 int family = AF_UNSPEC);
140 const sockaddr*
data() const noexcept;
147 socklen_t
size() const noexcept;
159 bool operator==(const
Address& other) const noexcept;
const sockaddr * data() const noexcept
std::string toString() const
std::string getHost() const
int getFamily() const noexcept
socklen_t size() const noexcept
uint16_t getPort() const noexcept
static std::vector< Address > resolve(const std::string &host, uint16_t port, SocketType type, bool passive=false, int family=AF_UNSPEC)
Network namespace.
Definition address.hpp:30
SocketType
Definition address.hpp:35
@ TCP
Definition address.hpp:38
@ UDP
Definition address.hpp:41