82 void to_sockaddr(
int domain, sockaddr *addr,
int len)
const;
void set_name(const std::string &hostname, const std::string &port)
Set the socket name using a hostname and port.
Definition: socket_name.h:60
const std::string & port() const
Returns the port part of the socket name.
Definition: socket_name.h:54
bool operator<(const SocketName &other_instance) const
const std::string & address() const
Returns the address part of the socket name.
Definition: socket_name.h:51
SocketName()
Constructs a new socket name.
Definition: socket_name.h:46
SocketName to_ipv4()
Create socket name that uses the IP v4 address as its address.
SocketName to_hostname()
Create socket name that uses the hostname as its address.
std::string lookup_hostname() const
Perform a DNS lookup, if needed, for the hostname.
void from_sockaddr(int domain, sockaddr *addr, int len)
Get the socket name from a C sockets sockaddr structure.
void set_port(const std::string &port)
Set the IP port.
Definition: socket_name.h:67
Socket name; container class for an IP address and port.
Definition: socket_name.h:39
void to_sockaddr(int domain, sockaddr *addr, int len) const
Fill the socket name into a C sockets sockaddr structure.
bool operator==(const SocketName &other_instance) const
std::string lookup_ipv4() const
Perform a DNS lookup, if needed, for the IP v4 address.
SocketName(const std::string &port)
Definition: socket_name.h:47
void set_address(const std::string &address)
Set the IP address.
Definition: socket_name.h:64
SocketName(const std::string &address, const std::string &port)
Definition: socket_name.h:48
Definition: Application/application.h:35