This commit is contained in:
aozhiwei 2023-11-24 22:10:57 +08:00
parent e23fe79136
commit bbc15afd7e
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@
#include "playermgr.h"
#include "httpproxy.h"
#include "tracemgr.h"
#include "iomgr.h"
#include "mt/MetaMgr.h"
@ -28,10 +29,12 @@ void App::Init()
mt::MetaMgr::Instance()->Init();
PlayerMgr::Instance()->Init();
HttpProxy::Instance()->Init();
IoMgr::Instance()->Init();
}
void App::UnInit()
{
IoMgr::Instance()->UnInit();
PlayerMgr::Instance()->UnInit();
HttpProxy::Instance()->UnInit();
f8::BtMgr::Instance()->UnInit();
@ -43,7 +46,7 @@ void App::UnInit()
bool App::HasTask()
{
return false;
return true;
}
#if 0
@ -64,6 +67,7 @@ const std::string App::GetPkgName()
void App::Update(int delta_time)
{
IoMgr::Instance()->Update();
}
void App::DispatchSocketMsg(f8::MsgHdr* hdr)

View File

@ -26,13 +26,11 @@ void IoMgr::UnInit()
void IoMgr::Update()
{
#if 0
for (auto type_io_contexts : io_contexts_) {
for (auto io_context : type_io_contexts) {
io_context->poll();
}
}
#endif
}
std::shared_ptr<asio::io_context> IoMgr::GetIoContext(int type)