Mixes for Privacy and Anonymity in the Internet
|
The base of each control channel. More...
Public Member Functions | |
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 | |
virtual SINT32 | proccessMessage (const UINT8 *msg, UINT32 msglen)=0 |
Processes some bytes of a message we got from the communication channel. More... | |
virtual SINT32 | proccessMessageComplete ()=0 |
Called if a whole messages was received, which should be delivered to the final recipient. More... | |
SINT32 | setDispatcher (CAControlChannelDispatcher *pDispatcher) |
Sets the Dispatcher. More... | |
Protected Attributes | |
CAControlChannelDispatcher * | m_pDispatcher |
bool | m_bIsEncrypted |
UINT32 | m_ID |
Friends | |
class | CAControlChannelDispatcher |
The base of each control channel.
Controls channels should be derived from CASyncControlChannel or CAASyncControlChannel
CAAbstractControlChannel::CAAbstractControlChannel | ( | UINT8 | id, |
bool | bIsEncrypted | ||
) |
References m_bIsEncrypted, m_ID, and m_pDispatcher.
|
virtual |
UINT32 CAAbstractControlChannel::getID | ( | ) | const |
Returns the id of this control channel.
id | of control channel |
References m_ID.
Referenced by CAControlChannelDispatcher::registerControlChannel(), and CAReplayCtrlChannelMsgProc::~CAReplayCtrlChannelMsgProc().
|
protectedpure 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()
Implemented in CASyncControlChannel.
Referenced by CAControlChannelDispatcher::proccessMixPacket().
|
protectedpure virtual |
Called if a whole messages was received, which should be delivered to the final recipient.
Implemented in CASyncControlChannel.
Call to send a XML message via this control channel.
msgXML | buffer which holds the serialized XML message |
msgLen | size of msgXML |
E_SPACE,if | the serialized XML message is bigger than 0xFFFF bytes |
E_SUCCESS,if | the message that successful send |
E_UNKNOWN,in | case of an error |
References E_SPACE, CAControlChannelDispatcher::encryptMessage(), m_bIsEncrypted, m_ID, m_pDispatcher, and CAControlChannelDispatcher::sendMessages().
SINT32 CAAbstractControlChannel::sendXMLMessage | ( | const XERCES_CPP_NAMESPACE::DOMDocument * | pDocMsg | ) | const |
Call to send a XML message via this control channel.
Note that this message can not be bigger than 64 KBytes.
docMsg | XML document to sent over this control channel |
E_SPACE,if | the serialized XML message is bigger than 0xFFFF bytes |
E_SUCCESS,if | the message that successful send |
E_UNKNOWN,in | case of an error |
References DOM_Output::dumpToMem(), E_SPACE, and E_SUCCESS.
Referenced by CAAccountingInstance::finishLoginProcess(), CAFirstMixChannelList::forceKickout(), CAAccountingInstance::handleAccountCertificate_internal(), CAAccountingInstance::handleChallengeResponse_internal(), CAAccountingInstance::handleCostConfirmation_internal(), CAAccountingInstance::handleJapPacket_internal(), CAReplayCtrlChannelMsgProc::proccessGetTimestamp(), CAReplayCtrlChannelMsgProc::proccessGotTimestamp(), CAAccountingInstance::processJapMessageLoginHelper(), CAReplayCtrlChannelMsgProc::propagateCurrentReplayTimestamp(), CAAccountingInstance::returnPrepareKickout(), CAAccountingInstance::sendAILoginConfirmation(), CAAccountingInstance::sendCCRequest(), CAReplayCtrlChannelMsgProc::sendGetTimestamp(), and CAAccountingInstance::sendInitialCCRequest().
|
protected |
Sets the Dispatcher.
References E_SUCCESS, and m_pDispatcher.
Referenced by CAControlChannelDispatcher::registerControlChannel().
|
friend |
|
protected |
Referenced by CAAbstractControlChannel(), CASyncControlChannel::proccessMessage(), and sendXMLMessage().
|
protected |
Referenced by CAAbstractControlChannel(), getID(), and sendXMLMessage().
|
protected |
Referenced by CAAbstractControlChannel(), CASyncControlChannel::proccessMessage(), sendXMLMessage(), and setDispatcher().