예제 #1
0
		int TalkServiceI::getUserOnlineStatV1(const long userId, const Ice::Current& current){
			MilliTimer tStart;			

			LOG_DEBUG("TalkServiceI::getUserOnlineStat => userId = " << userId);
			int stat = MY_INSTANCE(TalkServer).getUserOnlineStat(userId);

			LOG_TIME("TalkServiceI::getUserOnlineStat|" << tStart.elapsed() );				
			return stat;
		}
예제 #2
0
		vector<int> TalkServiceI::getUsersOnlineStatSeq(const vector<long>& users, const Ice::Current& current){

			MilliTimer tStart;			

			LOG_DEBUG("TalkServiceI::getUsersOnlineStatSeq => size = " << users.size());

			vector<int> intVec = MY_INSTANCE(TalkServer).getLocalUsersOnlineStatSeq(users);

			LOG_TIME("TalkServiceI::getUsersOnlineStatSeq|" << users.size() << "|" << tStart.elapsed() );				
			return intVec;
		}
예제 #3
0
		void  Router2TalkServiceI::forwardIq(const std::string& xmppString, const Ice::Current& current)
		{

			MilliTimer  tStart;
			LOG_DEBUG("Router2TalkServiceI::forwordIq ==> begin.");
			int flag = router2talkServerPtr_->forwardIq(xmppString);
			if(flag < 0)
			{
				LOG_ERROR("Router2TalkServiceI::forwardIq ==> return error: "<<flag);
			}


			LOG_DEBUG("Route2TalkServiceI::forwordIq ==> end. use:"<<tStart.elapsed());
		}
예제 #4
0
		map<long, int> TalkServiceI::getUsersOnlineStatMapV1(const vector<long>& users, const Ice::Current& current){

			LOG_DEBUG("TalkServiceI::getUsersOnlineStatMap => size = " << users.size());
			MilliTimer tStart;			

			vector<int> statVector = MY_INSTANCE(TalkServer).getLocalUsersOnlineStatSeq(users);

			map<long, int> statMap;
			for(size_t i = 0; i < statVector.size(); ++i){
				statMap[users[i]] = statVector[i];
			}

			LOG_TIME("TalkServiceI::getUsersOnlineStatMap|" << users.size() << "|" << tStart.elapsed() );				
			return statMap;
		}
예제 #5
0
	void EndpointServiceProxy::deliverMsg(const long connectionId, const string& msg, long mid, int msgType){
		MilliTimer tStart;
		ReadLock lock(mutex_);
		EndpointServicePrx proxy = getProxy(connectionId);

		if(!proxy){
			LOG_ERROR("EndpointServiceProxy::deliverMsg => get proxy failure : cid = " << connectionId);
			return;
		}

		try{
			proxy->deliverMsg(connectionId, msg);
		}catch(std::exception& e){
			std::cout<<"EndpointServicePrx deliverMsg catch exception ="<<e.what()<<std::endl;
		}catch(...){
			std::cout<<"EndpointServicePrx deliverMsg unknow exception"<<std::endl;
		}
		LOG_TIME("EndpointServicePrx::deliverMsg|" << tStart.elapsed() );
		return;
	}