libassa
3.5.1
|
#include <Address.h>
Public Types | |
enum | addr_state_t { goodbit =0 , badbit =1 } |
State bits. More... | |
typedef int | addrstate |
Public Member Functions | |
Address () | |
Constructor. More... | |
virtual | ~Address () |
Destructor. More... | |
bool | good () const |
Valid address is constructed. More... | |
bool | bad () const |
Indicates whether there was error during address construction process i.e. More... | |
operator void * () const | |
Conversion to void * (or bool) for testing where bool is required (in conditional statements). More... | |
bool | operator! () const |
Alias to bad (). More... | |
virtual const int | getLength () const =0 |
Return length of the underlying address structure. More... | |
virtual SA * | getAddress () const =0 |
Retrieve pointer to the address structure. More... | |
virtual void | dump () |
Dump object state to the log file. More... | |
Protected Member Functions | |
void | setstate (addrstate flag_) |
Set state of the Address object. More... | |
Private Attributes | |
unsigned char | m_state |
typedef int ASSA::Address::addrstate |
|
inline |
Constructor.
Definition at line 65 of file Address.h.
References trace.
|
inlinevirtual |
|
inline |
Indicates whether there was error during address construction process i.e.
host or port lookup failure or invalid format used.
Definition at line 80 of file Address.h.
References badbit, and m_state.
Referenced by ASSA::Connector< SERVICE_HANDLER, PEER_CONNECTOR >::connect(), ASSA::Logger::log_open(), and operator!().
|
inlinevirtual |
Dump object state to the log file.
Reimplemented in ASSA::INETAddress.
Definition at line 101 of file Address.h.
References DL, good(), trace, and ASSA::TRACE.
Referenced by ASSA::INETAddress::dump().
|
pure virtual |
Retrieve pointer to the address structure.
Implemented in ASSA::UNIXAddress, and ASSA::INETAddress.
Referenced by ASSA::IPv4Socket::bind(), ASSA::UDPSocket::bind(), ASSA::IPv4Socket::connect(), ASSA::ConUDPSocket::connect(), ASSA::Acceptor< SERVICE_HANDLER, PEER_ACCEPTOR >::open(), ASSA::UnConUDPSocket::recvfrom(), and ASSA::UnConUDPSocket::sendto().
|
pure virtual |
Return length of the underlying address structure.
Implemented in ASSA::UNIXAddress, and ASSA::INETAddress.
Referenced by ASSA::IPv4Socket::bind(), ASSA::UDPSocket::bind(), ASSA::IPv4Socket::connect(), ASSA::ConUDPSocket::connect(), ASSA::UnConUDPSocket::recvfrom(), and ASSA::UnConUDPSocket::sendto().
|
inline |
|
inline |
|
inline |
Alias to bad ().
Definition at line 91 of file Address.h.
References bad().
|
inlineprotected |
Set state of the Address object.
flag_ | new state |
Definition at line 111 of file Address.h.
References m_state.
Referenced by ASSA::INETAddress::createHostPort(), ASSA::INETAddress::getHostName(), ASSA::INETAddress::getServiceByName(), and ASSA::UNIXAddress::UNIXAddress().
|
private |
Definition at line 61 of file Address.h.
Referenced by bad(), good(), and setstate().