Mixe for Privacy and Anonymity in the Internet
|
A synchronous control channel. More...
#include <CASyncControlChannel.hpp>
Public Member Functions | |
CASyncControlChannel (UINT8 id, bool bIsEncrypted) | |
Constructor for a synchronized (e.g. More... | |
virtual | ~CASyncControlChannel () |
virtual SINT32 | processXMLMessage (const XERCES_CPP_NAMESPACE::DOMDocument *docMsg)=0 |
Override this method to receive a XML Message. More... | |
Public Member Functions inherited from CAAbstractControlChannel | |
CAAbstractControlChannel (UINT8 id, bool bIsEncrypted) | |
virtual | ~CAAbstractControlChannel () |
SINT32 | sendXMLMessage (const XERCES_CPP_NAMESPACE::DOMDocument *pDocMsg) const |
Call to send a XML message via this control channel. More... | |
SINT32 | sendXMLMessage (const UINT8 *msgXML, UINT32 msgLen) const |
Call to send a XML message via this control channel. More... | |
UINT32 | getID () const |
Returns the id of this control channel. More... | |
Protected Member Functions | |
SINT32 | proccessMessage (const UINT8 *msg, UINT32 msglen) |
Processes some bytes of a message we got from the communication channel. More... | |
SINT32 | proccessMessageComplete () |
Parses the bytes in m_MsgBuff and calls processXMLMessage() More... | |
Protected Member Functions inherited from CAAbstractControlChannel | |
SINT32 | setDispatcher (CAControlChannelDispatcher *pDispatcher) |
Sets the Dispatcher. More... | |
Protected Attributes | |
UINT8 * | m_MsgBuff |
buffer for assembling the parts of the message More... | |
UINT32 | m_aktIndex |
how much bytes have we received already? More... | |
UINT32 | m_MsgBytesLeft |
how much bytes we need until all bytes are received? More... | |
Protected Attributes inherited from CAAbstractControlChannel | |
CAControlChannelDispatcher * | m_pDispatcher |
bool | m_bIsEncrypted |
UINT32 | m_ID |
A synchronous control channel.
This means, that every control message will be proccessed imedially. You have to override proccessXMLMessage().
Definition at line 36 of file CASyncControlChannel.hpp.
|
inline |
Constructor for a synchronized (e.g.
received messages are proccessed imedially) control channel.
id | id of the control channel |
bIsEncrypted | if true the control channel is encrypted - NOT IMPLEMENTED at the moment |
Definition at line 43 of file CASyncControlChannel.hpp.
References m_aktIndex, m_MsgBuff, and m_MsgBytesLeft.
|
virtual |
Definition at line 33 of file CASyncControlChannel.cpp.
References m_MsgBuff.
|
inlineprotectedvirtual |
Processes some bytes of a message we got from the communication channel.
We reassemble this fragments in a buffer. If all parts are received we call proccessMessagesComplete()
Implements CAAbstractControlChannel.
Definition at line 59 of file CASyncControlChannel.hpp.
References CAControlChannelDispatcher::decryptMessage(), E_SUCCESS, E_UNKNOWN, CAControlChannelDispatcher::isKeySet(), m_aktIndex, CAAbstractControlChannel::m_bIsEncrypted, m_MsgBuff, m_MsgBytesLeft, CAAbstractControlChannel::m_pDispatcher, min, CAMsg::printMsg(), and proccessMessageComplete().
|
inlineprotectedvirtual |
Parses the bytes in m_MsgBuff and calls processXMLMessage()
Implements CAAbstractControlChannel.
Definition at line 103 of file CASyncControlChannel.hpp.
References E_UNKNOWN, m_aktIndex, m_MsgBuff, m_MsgBytesLeft, parseDOMDocument(), CAMsg::printMsg(), and processXMLMessage().
Referenced by proccessMessage().
|
pure virtual |
Override this method to receive a XML Message.
Note: The DOMDocument reference is valid only within this call, i.e. will be delete afterwards form the caller! If you need to store it for later processing, make a copy of the DOMDocument using docMsg->cloneNode(true)
Implemented in CAReplayControlChannel, and CAAccountingControlChannel.
Referenced by proccessMessageComplete().
|
protected |
how much bytes have we received already?
Definition at line 138 of file CASyncControlChannel.hpp.
Referenced by CASyncControlChannel(), proccessMessage(), and proccessMessageComplete().
|
protected |
buffer for assembling the parts of the message
Definition at line 136 of file CASyncControlChannel.hpp.
Referenced by CASyncControlChannel(), proccessMessage(), proccessMessageComplete(), and ~CASyncControlChannel().
|
protected |
how much bytes we need until all bytes are received?
Definition at line 140 of file CASyncControlChannel.hpp.
Referenced by CASyncControlChannel(), proccessMessage(), and proccessMessageComplete().