Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CASyncControlChannel Class Referenceabstract

A synchronous control channel. More...

Inheritance diagram for CASyncControlChannel:
CAAbstractControlChannel CAAccountingControlChannel CAReplayControlChannel

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

UINT8m_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
CAControlChannelDispatcherm_pDispatcher
 
bool m_bIsEncrypted
 
UINT32 m_ID
 

Detailed Description

A synchronous control channel.

This means, that every control message will be proccessed imedially. You have to override proccessXMLMessage().

Constructor & Destructor Documentation

◆ CASyncControlChannel()

CASyncControlChannel::CASyncControlChannel ( UINT8  id,
bool  bIsEncrypted 
)

Constructor for a synchronized (e.g.

received messages are proccessed imedially) control channel.

Parameters
idid of the control channel
bIsEncryptedif true the control channel is encrypted - NOT IMPLEMENTED at the moment

References m_aktIndex, m_MsgBuff, and m_MsgBytesLeft.

◆ ~CASyncControlChannel()

CASyncControlChannel::~CASyncControlChannel ( )
virtual

References m_MsgBuff.

Member Function Documentation

◆ proccessMessage()

SINT32 CASyncControlChannel::proccessMessage ( const UINT8 msg,
UINT32  msglen 
)
protectedvirtual

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.

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().

◆ proccessMessageComplete()

SINT32 CASyncControlChannel::proccessMessageComplete ( )
protectedvirtual

◆ processXMLMessage()

virtual SINT32 CASyncControlChannel::processXMLMessage ( const XERCES_CPP_NAMESPACE::DOMDocument *  docMsg)
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().

Member Data Documentation

◆ m_aktIndex

UINT32 CASyncControlChannel::m_aktIndex
protected

how much bytes have we received already?

Referenced by CASyncControlChannel(), proccessMessage(), and proccessMessageComplete().

◆ m_MsgBuff

UINT8* CASyncControlChannel::m_MsgBuff
protected

buffer for assembling the parts of the message

Referenced by CASyncControlChannel(), proccessMessage(), proccessMessageComplete(), and ~CASyncControlChannel().

◆ m_MsgBytesLeft

UINT32 CASyncControlChannel::m_MsgBytesLeft
protected

how much bytes we need until all bytes are received?

Referenced by CASyncControlChannel(), proccessMessage(), and proccessMessageComplete().