From 39b058e58d9de9ef1d743858cd392433f2e3f051 Mon Sep 17 00:00:00 2001 From: H0zen Date: Sat, 11 Feb 2017 22:27:21 +0200 Subject: [PATCH] New thread pool reactor implementation and refactoring world daemon. (#8) * New thread pool reactor implementation and refactoring world daemon. * Fix Linux build. * Fix Windows debug builds. --- CMakeLists.txt | 2 +- .../ChatCommands/Level4.cpp} | 103 --- src/game/Server/WorldSocket.h | 8 +- src/game/Server/WorldSocketMgr.cpp | 299 ++------- src/game/Server/WorldSocketMgr.h | 47 +- src/game/WorldHandlers/MassMailMgr.h | 2 + src/game/WorldHandlers/World.cpp | 3 +- src/game/WorldHandlers/World.h | 2 +- src/mangosd/AFThread.cpp | 73 ++ src/mangosd/AFThread.h | 46 ++ src/mangosd/CMakeLists.txt | 11 +- src/mangosd/CliThread.cpp | 141 ++++ .../{Comm/CliRunnable.h => CliThread.h} | 21 +- src/mangosd/Main.cpp | 228 ------- src/mangosd/Master.cpp | 624 ------------------ src/mangosd/RA/RASocket.cpp | 330 --------- src/mangosd/RA/RASocket.h | 166 ----- src/mangosd/RAThread.cpp | 402 +++++++++++ src/mangosd/{Master.h => RAThread.h} | 79 +-- src/mangosd/SOAP/MaNGOSsoap.h | 120 ---- .../SOAP/{MaNGOSsoap.cpp => SoapThread.cpp} | 163 +++-- src/mangosd/SOAP/SoapThread.h | 53 ++ .../{WorldRunnable.cpp => WorldThread.cpp} | 43 +- .../{WorldRunnable.h => WorldThread.h} | 21 +- src/mangosd/mangosd.cpp | 585 ++++++++++++++++ src/shared/Utilities/Util.cpp | 35 +- src/shared/Utilities/Util.h | 6 + 27 files changed, 1608 insertions(+), 2005 deletions(-) rename src/{mangosd/Comm/CliRunnable.cpp => game/ChatCommands/Level4.cpp} (86%) create mode 100644 src/mangosd/AFThread.cpp create mode 100644 src/mangosd/AFThread.h create mode 100644 src/mangosd/CliThread.cpp rename src/mangosd/{Comm/CliRunnable.h => CliThread.h} (80%) delete mode 100644 src/mangosd/Main.cpp delete mode 100644 src/mangosd/Master.cpp delete mode 100644 src/mangosd/RA/RASocket.cpp delete mode 100644 src/mangosd/RA/RASocket.h create mode 100644 src/mangosd/RAThread.cpp rename src/mangosd/{Master.h => RAThread.h} (54%) delete mode 100644 src/mangosd/SOAP/MaNGOSsoap.h rename src/mangosd/SOAP/{MaNGOSsoap.cpp => SoapThread.cpp} (61%) create mode 100644 src/mangosd/SOAP/SoapThread.h rename src/mangosd/{WorldRunnable.cpp => WorldThread.cpp} (80%) rename src/mangosd/{WorldRunnable.h => WorldThread.h} (78%) create mode 100644 src/mangosd/mangosd.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 902de6350fa59..65ac96944ec94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ message( To set an option simply type -D