23 #ifndef SOCKETADDRESS_H
24 #define SOCKETADDRESS_H
27 #include <sys/types.h>
28 #include <sys/socket.h>
29 #include <netinet/in.h>
100 std::string
GetHostName(
bool numerichost =
true)
const;
133 int family,
unsigned portnum);
static SockAddrList Lookup(const char *const hostname, const char *const port, int family, unsigned portnum)
An abstraction of a socket address with convenience methods.
std::string GetHostName(bool numerichost=true) const
void SetFromPeerName(int fd)
Fill this SocketAddress with data from the other side of the connection represented by fd...
sa_family_t Family() const
static SockAddrList CreateIPFromServ(const char *servname)
Return a list of valid socket addresses for the given service name All CreateIP functions create IP a...
void SetFromSockName(int fd)
Fill this SocketAddress with data from this side of the connection represented by fd...
std::string GetServName() const
static SockAddrList CreateIPFromHost(const char *hostname)
static SockAddrList CreateIP(unsigned serv)
Return a list of valid socket address for the given service number or port number.
std::vector< SocketAddress > SockAddrList
union SocketAddress::address_ address