![]() |
Classes | |
class | protlib::TP |
transport protocol base class More... | |
class | protlib::TPError |
Transport Protocol Error. More... | |
class | protlib::TPErrorBadDestAddress |
class | protlib::TPErrorArgsNotInit |
class | protlib::TPErrorUnreachable |
class | protlib::TPErrorInternal |
class | protlib::TPErrorPayload |
class | protlib::TPErrorInitFailed |
class | protlib::TPErrorSendFailed |
class | protlib::TPErrorConnectSetupFail |
class | protlib::TPErrorCloseInd |
class | protlib::TPErrorAbortInd |
Namespaces | |
namespace | protlib |
Functions | |
protlib::TPError::TPError (tp_error_t e) | |
constructor | |
virtual const char * | protlib::TPError::getstr () const =0 |
get error string | |
virtual const char * | protlib::TPError::what () const throw () |
virtual const char * | protlib::TPErrorBadDestAddress::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorArgsNotInit::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorUnreachable::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorInternal::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorPayload::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorInitFailed::getstr () const |
get error string | |
protlib::TPErrorSendFailed::TPErrorSendFailed (int current_errno=0) | |
virtual const char * | protlib::TPErrorSendFailed::getstr () const |
get error string | |
int | protlib::TPErrorSendFailed::get_reason () const |
returns saved value of errno from send call | |
virtual const char * | protlib::TPErrorConnectSetupFail::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorCloseInd::getstr () const |
get error string | |
virtual const char * | protlib::TPErrorAbortInd::getstr () const |
get error string | |
protlib::TP::TP (protocol_t p, const string &pname, const string &tpn, const unsigned short common_header_length, bool(*const getmsglength)(NetMsg &netmsg, uint32 &msglen), uint32 mp=(uint32)-1) | |
constructor | |
virtual | protlib::TP::~TP ()=0 |
virtual destructor | |
protocol_t | protlib::TP::get_underlying_protocol () const |
get protocol ID | |
string | protlib::TP::get_underlying_protocol_name () const |
get protocol name | |
string | protlib::TP::get_tp_name () const |
get TP name | |
uint32 | protlib::TP::get_max_payload () const |
get maximum payload | |
void | protlib::TP::check_send_args (const NetMsg &msg, const address &addr) const |
check send arguments | |
Variables | |
const tp_error_t | protlib::TPError::errtype |
error code | |
typedef int | protlib::socketfd_t |
socket type interface | |
typedef unsigned int | protlib::associd_t |
typedef unsigned int protlib::associd_t |
Definition at line 44 of file assocdata.h.
typedef int protlib::socketfd_t |
check send arguments
Definition at line 87 of file tp.cpp.
References protlib::log::ERROR_LOG, protlib::NetMsg::get_size(), protlib::TP::init, Log, protlib::log::LOG_NORMAL, protlib::TP::max_payload, and protlib::TP::tp_name.
Referenced by protlib::TPoverTCP::tcpsend(), and protlib::TPoverUDP::udpsend().
uint32 protlib::TP::get_max_payload | ( | ) | const [inherited] |
int protlib::TPErrorSendFailed::get_reason | ( | ) | const [inline, inherited] |
returns saved value of errno from send call
Definition at line 131 of file tperror.h.
References protlib::TPErrorSendFailed::saved_errno.
Referenced by protlib::TPoverTCP::sender_thread().
string protlib::TP::get_tp_name | ( | ) | const [inherited] |
get TP name
Get the name of this TP implementation.
Definition at line 78 of file tp.cpp.
References protlib::TP::tp_name.
protocol_t protlib::TP::get_underlying_protocol | ( | ) | const [inherited] |
get protocol ID
Get the ID of the underlying transport protocol.
Definition at line 72 of file tp.cpp.
References protlib::TP::protocol.
Referenced by protlib::TPoverUDP::listener_thread().
string protlib::TP::get_underlying_protocol_name | ( | ) | const [inherited] |
get protocol name
Get the name of the underlying transport protocol.
Definition at line 75 of file tp.cpp.
References protlib::TP::protoname.
virtual const char* protlib::TPErrorAbortInd::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorCloseInd::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorConnectSetupFail::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorSendFailed::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorInitFailed::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorPayload::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorInternal::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorUnreachable::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorArgsNotInit::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPErrorBadDestAddress::getstr | ( | ) | const [inline, virtual, inherited] |
virtual const char* protlib::TPError::getstr | ( | ) | const [pure virtual, inherited] |
get error string
Reimplemented from protlib::ProtLibException.
Implemented in protlib::TPErrorBadDestAddress, protlib::TPErrorArgsNotInit, protlib::TPErrorUnreachable, protlib::TPErrorInternal, protlib::TPErrorPayload, protlib::TPErrorInitFailed, protlib::TPErrorSendFailed, protlib::TPErrorConnectSetupFail, protlib::TPErrorCloseInd, and protlib::TPErrorAbortInd.
Referenced by protlib::TPError::what().
protlib::TP::TP | ( | protocol_t | p, | |
const string & | pname, | |||
const string & | tpn, | |||
const unsigned short | common_header_length, | |||
bool(*)(NetMsg &netmsg, uint32 &msglen) | getmsglength, | |||
uint32 | mp = (uint32)-1 | |||
) | [inherited] |
constructor
Set ID of the underlying transport protocol, e.g. TCP, SCTP or UDP. Init is set false here, set to true in constructors of derived classes if initialization is done. If the maximum payload is greater than the maximum size of a network message, it is decreased.
protlib::TPError::TPError | ( | tp_error_t | e | ) | [inline, inherited] |
protlib::TPErrorSendFailed::TPErrorSendFailed | ( | int | current_errno = 0 |
) | [inline, inherited] |
virtual const char* protlib::TPError::what | ( | ) | const throw () [inline, virtual, inherited] |
Get a printable string representation of the error.
Reimplemented from protlib::ProtLibException.
Definition at line 73 of file tperror.h.
References protlib::TPError::getstr().
Referenced by protlib::TPoverTCP::sender_thread().
protlib::TP::~TP | ( | ) | [pure virtual, inherited] |
virtual destructor
TP destructor does nothing.
Definition at line 69 of file tp.cpp.
References protlib::TP::init.
const tp_error_t protlib::TPError::errtype [inherited] |