aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Master.cpp
diff options
context:
space:
mode:
authorclick <none@none>2010-07-23 09:26:23 +0200
committerclick <none@none>2010-07-23 09:26:23 +0200
commit3f9ea75bfa990b2079c581052073fcf4962dd594 (patch)
tree919ffc43bd81fd5b0949c9edac5a8c29b7918b3e /src/server/worldserver/Master.cpp
parent912a099d491a58e068994c63a1055ab17af37634 (diff)
Add SOAP-implementation (based on Benjys patch and adapted for latest core by xk1)
--HG-- branch : trunk
Diffstat (limited to 'src/server/worldserver/Master.cpp')
-rw-r--r--src/server/worldserver/Master.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index f6f4260e303..4a986893d78 100644
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -38,6 +38,7 @@
#include "Log.h"
#include "Master.h"
#include "RASocket.h"
+#include "TCSoap.h"
#include "Timer.h"
#include "Util.h"
@@ -315,6 +316,15 @@ int Master::Run()
}
}
#endif
+ //Start soap serving thread
+ ACE_Based::Thread* soap_thread = NULL;
+
+ if(sConfig.GetBoolDefault("SOAP.Enabled", false))
+ {
+ TCSoapRunnable *runnable = new TCSoapRunnable();
+ runnable->setListenArguments(sConfig.GetStringDefault("SOAP.IP", "127.0.0.1"), sConfig.GetIntDefault("SOAP.Port", 7878));
+ soap_thread = new ACE_Based::Thread(runnable);
+ }
uint32 realCurrTime, realPrevTime;
realCurrTime = realPrevTime = getMSTime();
@@ -341,6 +351,13 @@ int Master::Run()
sWorldSocketMgr->Wait ();
+ if(soap_thread)
+ {
+ soap_thread->wait();
+ soap_thread->destroy();
+ delete soap_thread;
+ }
+
// set server offline
LoginDatabase.PExecute("UPDATE realmlist SET color = 2 WHERE id = '%d'",realmID);