diff options
Diffstat (limited to 'Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp')
| -rw-r--r-- | Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp b/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp new file mode 100644 index 0000000..522ba1d --- /dev/null +++ b/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp @@ -0,0 +1,62 @@ +/*!
+ * \file XorayaConnector.cpp
+ * \author S. Eisenhauer
+ * \date 27.10.2011
+ * \brief Implementation of CXorayaConnector
+ */
+
+#include <exception>
+#include <boost/thread.hpp>
+#include <boost/asio.hpp>
+#include "TcpServer.h"
+#include "protocol.h"
+#include "XorayaConnector.h"
+#include "CPluginExecutor.h"
+#include "global.h"
+
+boost::asio::io_service g_xIoService;
+
+CXorayaConnector::CXorayaConnector(const CXorayaConnector& other)
+:m_pxExecutor(other.m_pxExecutor),m_xTcpServer(other.m_xTcpServer)
+{
+ DEBUG_PRINT("entry");
+ DEBUG_PRINT("exit");
+}
+
+CXorayaConnector::CXorayaConnector(CPluginExecutor* pxExecutor,CTcpServer& xTcpServer)
+:m_pxExecutor(pxExecutor),m_xTcpServer(xTcpServer)
+{
+ DEBUG_PRINT("entry");
+ DEBUG_PRINT("exit");
+}
+
+CXorayaConnector::~CXorayaConnector(void)
+{
+ DEBUG_PRINT("entry");
+ DEBUG_PRINT("exit");
+}
+
+void CXorayaConnector::operator()()
+{
+ try
+ {
+ g_xIoService.run();
+ DEBUG_PRINT(" io service returned ");
+ }
+ catch(std::exception& e)
+ {
+ ERROR_PRINT("%s",e.what());
+ }
+ return;
+}
+void CXorayaConnector::vStop()
+{
+ g_xIoService.stop();
+}
+void CXorayaConnector::vUploadLogMessage(const tstLogMessage& stLogMsg)
+{
+// DEBUG_PRINT("entry");
+ m_xTcpServer.vUploadLogMessage(stLogMsg);
+// DEBUG_PRINT("exit");
+}
+
|
