26 #ifndef NIDAS_UTIL_SOCKETADDRESS
27 #define NIDAS_UTIL_SOCKETADDRESS
31 namespace nidas {
namespace util {
56 virtual int getPort()
const = 0;
77 virtual std::string
toString()
const = 0;
virtual struct sockaddr * getSockAddrPtr()=0
Provide non-const pointer to struct sockaddr_in.
An interface for a socket address.
Definition: SocketAddress.h:36
virtual socklen_t getSockAddrLen() const =0
Return the length of the struct sockaddr_XX for this address family.
virtual std::string toString() const =0
Java style toString.
virtual int getFamily() const =0
Get the family of this SocketAddress, one of the values from /usr/include/sys/socket.h: AF_UNIX, AF_INET, AF_INET6, etc.
virtual int getPort() const =0
return the port number of this address, or -1 if there is no associated port number, e.g.
virtual std::string toAddressString() const =0
Java style toString, but no DNS lookup.
virtual ~SocketAddress()
Definition: SocketAddress.h:44
virtual struct sockaddr * getConstSockAddrPtr() const =0
virtual SocketAddress * clone() const =0
Virtual constructor.