summaryrefslogtreecommitdiffstats
path: root/Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp
downloadStudium-master.tar.gz
Studium-master.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp')
-rw-r--r--Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp62
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");
+}
+