当前位置: 首页>>代码示例>>C++>>正文


C++ MemoryStream::done方法代码示例

本文整理汇总了C++中kbengine::MemoryStream::done方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryStream::done方法的具体用法?C++ MemoryStream::done怎么用?C++ MemoryStream::done使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kbengine::MemoryStream的用法示例。


在下文中一共展示了MemoryStream::done方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: syncEntityStreamTemplate

//-------------------------------------------------------------------------------------
void Dbmgr::syncEntityStreamTemplate(Network::Channel* pChannel, KBEngine::MemoryStream& s)
{
	KBEAccountTable* pTable = 
		static_cast<KBEAccountTable*>(EntityTables::getSingleton().findKBETable("kbe_accountinfos"));

	KBE_ASSERT(pTable);

	pTable->accountDefMemoryStream(s);
	s.done();
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:11,代码来源:dbmgr.cpp

示例2: updateLogWatcherSetting

//-------------------------------------------------------------------------------------
void Logger::updateLogWatcherSetting(Network::Channel* pChannel, KBEngine::MemoryStream& s)
{
	LogWatcher* pLogwatcher = &logWatchers_[pChannel->addr()];
	if(!pLogwatcher->updateSetting(&s))
	{
		ERROR_MSG(fmt::format("Logger::updateLogWatcherSetting: addr={} is failed!\n",
			pChannel->addr().c_str()));

		logWatchers_.erase(pChannel->addr());
	}

	s.done();
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:14,代码来源:logger.cpp

示例3: writeEntity

//-------------------------------------------------------------------------------------
void Dbmgr::writeEntity(Network::Channel* pChannel, 
						KBEngine::MemoryStream& s)
{
	ENTITY_ID eid;
	DBID entityDBID;
	COMPONENT_ID componentID;

	s >> componentID >> eid >> entityDBID;

	bufferedDBTasks_.addTask(new DBTaskWriteEntity(pChannel->addr(), componentID, eid, entityDBID, s));
	s.done();

	numWrittenEntity_++;
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:15,代码来源:dbmgr.cpp

示例4: executeRawDatabaseCommand

//-------------------------------------------------------------------------------------
void Dbmgr::executeRawDatabaseCommand(Network::Channel* pChannel, 
									  KBEngine::MemoryStream& s)
{
	ENTITY_ID entityID = -1;
	s >> entityID;

	if(entityID == -1)
		DBUtil::pThreadPool()->addTask(new DBTaskExecuteRawDatabaseCommand(pChannel->addr(), s));
	else
		bufferedDBTasks_.addTask(new DBTaskExecuteRawDatabaseCommandByEntity(pChannel->addr(), s, entityID));

	s.done();

	numExecuteRawDatabaseCommand_++;
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:16,代码来源:dbmgr.cpp

示例5: removeEntity

//-------------------------------------------------------------------------------------
void Dbmgr::removeEntity(Network::Channel* pChannel, KBEngine::MemoryStream& s)
{
	ENTITY_ID eid;
	DBID entityDBID;
	COMPONENT_ID componentID;

	s >> componentID >> eid >> entityDBID;
	KBE_ASSERT(entityDBID > 0);

	bufferedDBTasks_.addTask(new DBTaskRemoveEntity(pChannel->addr(), 
		componentID, eid, entityDBID, s));

	s.done();

	numRemovedEntity_++;
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:17,代码来源:dbmgr.cpp

示例6: registerLogWatcher

//-------------------------------------------------------------------------------------
void Logger::registerLogWatcher(Network::Channel* pChannel, KBEngine::MemoryStream& s)
{
	LogWatcher* pLogwatcher = &logWatchers_[pChannel->addr()];
	if(!pLogwatcher->createFromStream(&s))
	{
		ERROR_MSG(fmt::format("Logger::registerLogWatcher: addr={} is failed!\n",
			pChannel->addr().c_str()));

		logWatchers_.erase(pChannel->addr());
		s.done();
		return;
	}

	pLogwatcher->addr(pChannel->addr());

	INFO_MSG(fmt::format("Logger::registerLogWatcher: addr={0} is successfully!\n",
		pChannel->addr().c_str()));

	bool first;
	s >> first;

	if(first)
		sendInitLogs(*pLogwatcher);
}
开发者ID:ArcherPeng,项目名称:kbengine-cocos2dx,代码行数:25,代码来源:logger.cpp


注:本文中的kbengine::MemoryStream::done方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。