コード例 #1
0
ファイル: proxy.cpp プロジェクト: JustDo1989/kbengine
//-------------------------------------------------------------------------------------
void Proxy::initClientBasePropertys()
{
	if(clientMailbox() == NULL)
		return;

	MemoryStream* s1 = MemoryStream::ObjPool().createObject();
	addClientDataToStream(s1);
	
	if(s1->wpos() > 0)
	{
		Network::Bundle* pBundle = Network::Bundle::ObjPool().createObject();
		(*pBundle).newMessage(ClientInterface::onUpdatePropertys);
		(*pBundle) << this->id();
		(*pBundle).append(*s1);
		sendToClient(ClientInterface::onUpdatePropertys, pBundle);
		//clientMailbox()->postMail((*pBundle));
	}

	MemoryStream::ObjPool().reclaimObject(s1);
}
コード例 #2
0
ファイル: proxy.cpp プロジェクト: sdsgwangpeng/kbengine
//-------------------------------------------------------------------------------------
void Proxy::initClientBasePropertys()
{
	if(getClientMailbox() == NULL)
		return;

	MemoryStream* s1 = MemoryStream::ObjPool().createObject();
	addClientDataToStream(s1);
	
	if(s1->wpos() > 0)
	{
		Mercury::Bundle* pBundle = Mercury::Bundle::ObjPool().createObject();
		(*pBundle).newMessage(ClientInterface::onUpdatePropertys);
		(*pBundle) << this->getID();
		(*pBundle).append(*s1);
		getClientMailbox()->postMail((*pBundle));
		Mercury::Bundle::ObjPool().reclaimObject(pBundle);
	}

	MemoryStream::ObjPool().reclaimObject(s1);
}