InspIRCd  4.0
Public Member Functions | Public Attributes | List of all members
irc::sockets::sockaddrs Union Reference

Public Member Functions

int family () const
socklen_t sa_size () const
int port () const
std::string addr () const
std::string str () const
bool operator== (const sockaddrs &other) const
bool operator!= (const sockaddrs &other) const

Public Attributes

struct sockaddr sa
struct sockaddr_in in4
struct sockaddr_in6 in6
struct sockaddr_un un

Member Function Documentation

◆ addr()

std::string irc::sockets::sockaddrs::addr ( ) const

Return IP only

◆ family()

int irc::sockets::sockaddrs::family ( ) const

Return the family of the socket (e.g. AF_INET).

◆ port()

int irc::sockets::sockaddrs::port ( ) const

Return port number or -1 if invalid

◆ sa_size()

socklen_t irc::sockets::sockaddrs::sa_size ( ) const

Return the size of the structure for syscall passing

◆ str()

std::string irc::sockets::sockaddrs::str ( ) const

Return human-readable IP/port pair

The documentation for this union was generated from the following files: