You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#include "IM_ClientHandler.h"
#include "../../lib/alg/generic/md5.h"
#include "../../lib/data/json/json_tool.h"
#define LOG( X ) m_pLog->Log( "NCH", this, X )
#ifdef DEBUG
#define LOG_ERROR( X ) {\
char _tBfrErrMSG234[256];\ sprintf( _tBfrErrMSG234, "In file %s[%d] in func:%s %s",__FILE__, __LINE__, __func__, X );\ m_pLog->Log( "NCH", this, _LOG_ERROR, _tBfrErrMSG234 );\ }#else
#define LOG_ERROR( X ) m_pLog->Log( "NCH", this, _LOG_ERROR, X );
#endif
// Constructor implementation
IM_ClientHandler::IM_ClientHandler( int SOCKET ) : networkClientHandler( SOCKET ), IM_ClientProtocol(){ m_pLog = basicLogCollection::getInstance(); if( m_pPort != NULL ){ //LOG("server port is OK");
if( create() ){ setTransport( m_pPort ); setConnectionStatus( CS_INIT ); m_pPort->addRecipient(( protocolParser *)this ); } else { LOG_ERROR( "Protocol Parser Creation Failed!"); }; };};
// Destructor implementation
inline IM_ClientHandler::~IM_ClientHandler(){
};
bool IM_ClientHandler::getStatus( void ){ if( m_pPort!= NULL ) { return m_pPort->getStatus(); }; return false;};
#undef LOG
#undef LOG_ERROR
|