#include <yateclass.h>
Inheritance diagram for SocketAddr:
Public Member Functions | |
SocketAddr () | |
SocketAddr (const SocketAddr &value) | |
SocketAddr (int family) | |
SocketAddr (const struct sockaddr *addr, socklen_t len=0) | |
virtual | ~SocketAddr () |
SocketAddr & | operator= (const SocketAddr &value) |
bool | operator== (const SocketAddr &other) const |
bool | operator!= (const SocketAddr &other) const |
void | clear () |
bool | assign (int family) |
void | assign (const struct sockaddr *addr, socklen_t len=0) |
bool | local (const SocketAddr &remote) |
bool | valid () const |
bool | null () const |
int | family () const |
const String & | host () const |
virtual bool | host (const String &name) |
int | port () const |
bool | port (int newport) |
sockaddr * | address () const |
socklen_t | length () const |
Static Public Member Functions | |
static bool | supports (int family) |
Protected Member Functions | |
virtual void | stringify () |
Protected Attributes | |
sockaddr * | m_address |
socklen_t | m_length |
String | m_host |
Wrapper class to keep a socket address
|
Default constructor of an empty address |
|
Copy constructor
|
|
Constructor of a null address
|
|
Constructor that stores a copy of an address
|
|
Destructor that frees and zeroes out everything |
|
Get the contained socket address
|
|
Assigns a new address
|
|
Assigns an empty address of a specific type
|
|
Clears up the address, frees the memory |
|
Get the family of the stored address
|
|
Set the hostname of this address
|
|
Get the host of this address
|
|
Get the length of the address
|
|
Attempt to guess a local address that will be used to reach a remote one
|
|
Check if a null address is held
|
|
Inequality comparation operator
|
|
Assignment operator
|
|
Equality comparation operator
|
|
Set the port of the stored address (if supported)
|
|
Get the port of the stored address (if supported)
|
|
Convert the host address to a String stored in m_host |
|
Check if an address family is supported by the library
|
|
Check if a non-null address is held
|