aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver/Master.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/worldserver/Master.cpp')
-rwxr-xr-xsrc/server/worldserver/Master.cpp49
1 files changed, 1 insertions, 48 deletions
diff --git a/src/server/worldserver/Master.cpp b/src/server/worldserver/Master.cpp
index 4dede995597..3f376de6f49 100755
--- a/src/server/worldserver/Master.cpp
+++ b/src/server/worldserver/Master.cpp
@@ -36,7 +36,7 @@
#include "CliRunnable.h"
#include "Log.h"
#include "Master.h"
-#include "RASocket.h"
+#include "RARunnable.h"
#include "TCSoap.h"
#include "Timer.h"
#include "Util.h"
@@ -114,53 +114,6 @@ public:
}
};
-class RARunnable : public ACE_Based::Runnable
-{
-public:
- RARunnable () {}
-
- void run ()
- {
- SocketHandler h;
-
- // Launch the RA listener socket
- ListenSocket<RASocket> RAListenSocket (h);
- bool usera = sConfig.GetBoolDefault ("Ra.Enable", false);
-
- if (usera)
- {
- port_t raport = sConfig.GetIntDefault ("Ra.Port", 3443);
- std::string stringip = sConfig.GetStringDefault ("Ra.IP", "0.0.0.0");
- ipaddr_t raip;
- if (!Utility::u2ip (stringip, raip))
- sLog.outError ("Trinity RA can not bind to ip %s", stringip.c_str ());
- else if (RAListenSocket.Bind (raip, raport))
- sLog.outError ("Trinity RA can not bind to port %d on %s", raport, stringip.c_str ());
- else
- {
- h.Add (&RAListenSocket);
-
- sLog.outString ("Starting Remote access listner on port %d on %s", raport, stringip.c_str ());
- }
- }
-
- // Socket Selet time is in microseconds , not miliseconds!!
- uint32 socketSelecttime = sWorld.getIntConfig(CONFIG_SOCKET_SELECTTIME);
-
- // if use ra spend time waiting for io, if not use ra ,just sleep
- if (usera)
- {
- while (!World::IsStopped())
- h.Select (0, socketSelecttime);
- }
- else
- {
- while (!World::IsStopped())
- ACE_Based::Thread::Sleep(static_cast<unsigned long> (socketSelecttime / 1000));
- }
- }
-};
-
Master::Master()
{
}