1
This commit is contained in:
parent
7daf6dd6b9
commit
f2f6d20e8a
@ -123,8 +123,9 @@ static void SavePerfLog()
|
||||
f8::HttpClientPool::Instance()->max_user_request_delay = 0;
|
||||
}
|
||||
|
||||
bool App::Init(int argc, char* argv[])
|
||||
void App::Init()
|
||||
{
|
||||
#if 0
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
this->argc_ = argc;
|
||||
this->argv_ = argv;
|
||||
@ -227,6 +228,7 @@ bool App::Init(int argc, char* argv[])
|
||||
);
|
||||
}
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
void App::UnInit()
|
||||
@ -598,3 +600,18 @@ int App::GetVersion()
|
||||
}
|
||||
return *version_;
|
||||
}
|
||||
|
||||
const std::string App::GetPkgName()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void App::Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void App::DispatchSocketMsg(f8::MsgHdr* hdr)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -4,9 +4,10 @@
|
||||
#include <a8/singleton.h>
|
||||
|
||||
#include <f8/protoutils.h>
|
||||
#include <f8/app.h>
|
||||
|
||||
struct MsgNode;
|
||||
class App : public a8::Singleton<App>
|
||||
class App : public f8::UserApp, public a8::Singleton<App>
|
||||
{
|
||||
private:
|
||||
App() {};
|
||||
@ -17,8 +18,11 @@ public:
|
||||
std::map<int, int> debug_params;
|
||||
#endif
|
||||
|
||||
bool Init(int argc, char* argv[]);
|
||||
void UnInit();
|
||||
virtual const std::string GetPkgName() override;
|
||||
virtual void Init() override;
|
||||
virtual void UnInit() override;
|
||||
virtual void Update() override;
|
||||
virtual void DispatchSocketMsg(f8::MsgHdr* hdr) override;
|
||||
|
||||
int Run();
|
||||
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include "precompile.h"
|
||||
|
||||
#include <f8/app.h>
|
||||
|
||||
#include "app.h"
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int exitcode = 0;
|
||||
if (App::Instance()->Init(argc, argv)) {
|
||||
exitcode = App::Instance()->Run();
|
||||
App::Instance()->UnInit();
|
||||
}
|
||||
return exitcode;
|
||||
return f8::App::Instance()->Run(argc, argv, App::Instance());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user