Mixes for Privacy and Anonymity in the Internet
Public Member Functions | Protected Member Functions | Protected Attributes
CASyncControlChannel Class Reference

A synchronous control channel. More...

Inheritance diagram for CASyncControlChannel:
CAAbstractControlChannel CAAccountingControlChannel CAReplayControlChannel

List of all members.

Public Member Functions

 CASyncControlChannel (UINT8 id, bool bIsEncrypted)
 Constructor for a synchronized (e.g.
virtual ~CASyncControlChannel ()
virtual SINT32 processXMLMessage (const XERCES_CPP_NAMESPACE::DOMDocument *docMsg)=0
 Override this method to receive a XML Message.

Protected Member Functions

SINT32 proccessMessage (const UINT8 *msg, UINT32 msglen)
 Processes some bytes of a message we got from the communication channel.
SINT32 proccessMessageComplete ()
 Parses the bytes in m_MsgBuff and calls processXMLMessage()

Protected Attributes

UINT8m_MsgBuff
 buffer for assembling the parts of the message
UINT32 m_aktIndex
 how much bytes have we received already?
UINT32 m_MsgBytesLeft
 how much bytes we need until all bytes are received?

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

References m_MsgBuff.


Member Function Documentation

SINT32 CASyncControlChannel::proccessMessage ( const UINT8 msg,
UINT32  msglen 
) [protected, virtual]

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, CAMsg::printMsg(), and proccessMessageComplete().

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 CAAccountingControlChannel, and CAReplayControlChannel.

Referenced by proccessMessageComplete().


Member Data Documentation

how much bytes have we received already?

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

buffer for assembling the parts of the message

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

how much bytes we need until all bytes are received?

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