Marine Library  1.0
C++ library for Linux Networking Development
Public Member Functions | Static Public Member Functions | List of all members
CSockAddr Class Reference

Public Member Functions

 CSockAddr (const std::string &host, const std::string &serv)
 
 CSockAddr (const std::string &host, uint16_t port=0, bool hostOrder=true)
 
 CSockAddr (const __SS &addr, socklen_t len)
 
 CSockAddr (const __SA &addr, socklen_t len)
 
 CSockAddr (const __SA4 &addr)
 
 CSockAddr (const __SA6 &addr)
 
bool setIp (const std::string &host)
 
bool setIp (uint32_t ipv4, bool hostOrder=true)
 
bool setIp (const in6_addr &ipv6)
 
bool setPort (const std::string &serv)
 
bool setPort (uint16_t port, bool hostOrder=true)
 
bool setAddr (const __SS &addr, socklen_t len)
 
bool setAddr (const __SA &addr, socklen_t len)
 
bool setAddr (const __SA4 &addr)
 
bool setAddr (const __SA6 &addr)
 
uint32_t getIpv4 (bool hostOrder=true) const
 
bool getIpv6 (struct in6_addr &ipv6) const
 
uint16_t getPort (bool hostOrder=true) const
 
void clear ()
 
bool valid () const
 
std::string toString () const
 
int family () const
 
const __SA * sockaddr () const
 
socklen_t socklen () const
 

Static Public Member Functions

static std::string IPv4String (uint32_t ipv4, bool hostOrder=true)
 
static bool IPv6String (const struct in6_addr &ipv6, std::string *result)
 
static uint32_t IPv4FromStr (const std::string &ipv4, bool hostOrder=true)
 
static bool IPv6FromStr (const std::string &ipv6, struct in6_addr *addr)
 
static uint32_t IPv4FromIf (const std::string &eth, bool hostOrder=true)
 

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