From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../src/XorayaPluginExecutor/XorayaConnector.cpp | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp (limited to 'Master/Masterarbeit/src/XorayaPluginExecutor/XorayaConnector.cpp') 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 +#include +#include +#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"); +} + -- cgit v1.2.3