feat(Core/Config): rework config and delete ACE inherited (#4608)

This commit is contained in:
Kargatum
2021-02-28 20:37:03 +07:00
committed by GitHub
parent c2f274e06d
commit dbefa17a53
36 changed files with 1340 additions and 816 deletions

View File

@@ -43,13 +43,13 @@ RARunnable::~RARunnable()
void RARunnable::run()
{
if (!sConfigMgr->GetBoolDefault("Ra.Enable", false))
if (!sConfigMgr->GetOption<bool>("Ra.Enable", false))
return;
ACE_Acceptor<RASocket, ACE_SOCK_ACCEPTOR> acceptor;
uint16 raPort = uint16(sConfigMgr->GetIntDefault("Ra.Port", 3443));
std::string stringIp = sConfigMgr->GetStringDefault("Ra.IP", "0.0.0.0");
uint16 raPort = uint16(sConfigMgr->GetOption<int32>("Ra.Port", 3443));
std::string stringIp = sConfigMgr->GetOption<std::string>("Ra.IP", "0.0.0.0");
ACE_INET_Addr listenAddress(raPort, stringIp.c_str());
if (acceptor.open(listenAddress, m_Reactor) == -1)

View File

@@ -23,7 +23,7 @@
RASocket::RASocket()
{
_minLevel = uint8(sConfigMgr->GetIntDefault("RA.MinLevel", 3));
_minLevel = uint8(sConfigMgr->GetOption<int32>("RA.MinLevel", 3));
_commandExecuting = false;
}