chore(Core/Soap): Renamed TCSoap to ACSoap (#2509)

This commit is contained in:
IntelligentQuantum
2019-12-27 02:31:57 +03:30
committed by Stoabrogga
parent 0a9f230f83
commit 5198b2614e
3 changed files with 38 additions and 43 deletions

View File

@@ -23,7 +23,7 @@
#include "Log.h"
#include "Master.h"
#include "RARunnable.h"
#include "TCSoap.h"
#include "ACSoap.h"
#include "Timer.h"
#include "Util.h"
#include "RealmList.h"
@@ -121,16 +121,16 @@ int Master::Run()
sLog->outString("%s (worldserver-daemon)", GitRevision::GetFullVersion());
sLog->outString("<Ctrl-C> to stop.\n");
sLog->outString(" █████╗ ███████╗███████╗██████╗ ██████╗ ████████╗██╗ ██╗");
sLog->outString(" ██╔══██╗╚══███╔╝██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║ ██║");
sLog->outString(" ███████║ ███╔╝ █████╗ ██████╔╝██║ ██║ ██║ ███████║");
sLog->outString(" ██╔══██║ ███╔╝ ██╔══╝ ██╔══██╗██║ ██║ ██║ ██╔══██║");
sLog->outString(" ██║ ██║███████╗███████╗██║ ██║╚██████╔╝ ██║ ██║ ██║");
sLog->outString(" ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝");
sLog->outString(" █████╗ ███████╗███████╗██████╗ ██████╗ ████████╗██╗ ██╗");
sLog->outString(" ██╔══██╗╚══███╔╝██╔════╝██╔══██╗██╔═══██╗╚══██╔══╝██║ ██║");
sLog->outString(" ███████║ ███╔╝ █████╗ ██████╔╝██║ ██║ ██║ ███████║");
sLog->outString(" ██╔══██║ ███╔╝ ██╔══╝ ██╔══██╗██║ ██║ ██║ ██╔══██║");
sLog->outString(" ██║ ██║███████╗███████╗██║ ██║╚██████╔╝ ██║ ██║ ██║");
sLog->outString(" ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝");
sLog->outString(" ██████╗ ██████╗ ██████╗ ███████╗");
sLog->outString(" ██╔════╝██╔═══██╗██╔══██╗██╔═══╝");
sLog->outString(" ██║ ██║ ██║██████╔╝█████╗");
sLog->outString(" ██║ ██║ ██║██╔══██╗██╔══╝");
sLog->outString(" ██║ ██║ ██║██████╔╝█████╗");
sLog->outString(" ██║ ██║ ██║██╔══██╗██╔══╝");
sLog->outString(" ╚██████╗╚██████╔╝██║ ██║███████╗");
sLog->outString(" ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝\n");
@@ -202,25 +202,25 @@ int Master::Run()
auctionLising_thread.setPriority(acore::Priority_High);
#if defined(_WIN32) || defined(__linux__)
///- Handle affinity for multiple processors and process priority
uint32 affinity = sConfigMgr->GetIntDefault("UseProcessors", 0);
bool highPriority = sConfigMgr->GetBoolDefault("ProcessPriority", false);
#ifdef _WIN32 // Windows
HANDLE hProcess = GetCurrentProcess();
if (affinity > 0)
{
ULONG_PTR appAff;
ULONG_PTR sysAff;
if (GetProcessAffinityMask(hProcess, &appAff, &sysAff))
{
ULONG_PTR currentAffinity = affinity & appAff; // remove non accessible processors
if (!currentAffinity)
sLog->outError("Processors marked in UseProcessors bitmask (hex) %x are not accessible for the worldserver. Accessible processors bitmask (hex): %x", affinity, appAff);
else if (SetProcessAffinityMask(hProcess, currentAffinity))
@@ -229,7 +229,7 @@ int Master::Run()
sLog->outError("Can't set used processors (hex): %x", currentAffinity);
}
}
if (highPriority)
{
if (SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS))
@@ -237,9 +237,9 @@ int Master::Run()
else
sLog->outError("Can't set worldserver process priority class.");
}
#else // Linux
if (affinity > 0)
{
cpu_set_t mask;
@@ -266,7 +266,7 @@ int Master::Run()
else
sLog->outString("worldserver process priority class set to %i", getpriority(PRIO_PROCESS, 0));
}
#endif
#endif
@@ -274,7 +274,7 @@ int Master::Run()
acore::Thread* soapThread = NULL;
if (sConfigMgr->GetBoolDefault("SOAP.Enabled", false))
{
TCSoapRunnable* runnable = new TCSoapRunnable();
ACSoapRunnable* runnable = new ACSoapRunnable();
runnable->SetListenArguments(sConfigMgr->GetStringDefault("SOAP.IP", "127.0.0.1"), uint16(sConfigMgr->GetIntDefault("SOAP.Port", 7878)));
soapThread = new acore::Thread(runnable);
}