本文整理汇总了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();
}
示例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();
}
示例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_++;
}
示例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_++;
}
示例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_++;
}
示例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);
}