From 333fd931c432fbd1f65dec7075e7548b3e555bdb Mon Sep 17 00:00:00 2001 From: zhaohe Date: Thu, 4 Jan 2024 15:50:12 +0800 Subject: [PATCH] update --- .gitmodules | 3 +++ iflytop_xsync_protocol | 1 + xsync.cpp | 9 +++++++++ xsync.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 .gitmodules create mode 160000 iflytop_xsync_protocol create mode 100644 xsync.cpp create mode 100644 xsync.hpp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9619bfd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "iflytop_xsync_protocol"] + path = iflytop_xsync_protocol + url = zwsd@192.168.1.3:p_lusterinc/iflytop_xsync_protocol.git diff --git a/iflytop_xsync_protocol b/iflytop_xsync_protocol new file mode 160000 index 0000000..dd0c38c --- /dev/null +++ b/iflytop_xsync_protocol @@ -0,0 +1 @@ +Subproject commit dd0c38c767378dbe9010cd7e94bf1bf7cf0e40d5 diff --git a/xsync.cpp b/xsync.cpp new file mode 100644 index 0000000..6ec68ea --- /dev/null +++ b/xsync.cpp @@ -0,0 +1,9 @@ +#include "xsync.hpp" +using namespace iflytop; + +Xsync::Xsync(/* args */) { + +} +Xsync::~Xsync() { + +} \ No newline at end of file diff --git a/xsync.hpp b/xsync.hpp new file mode 100644 index 0000000..f844cd2 --- /dev/null +++ b/xsync.hpp @@ -0,0 +1,40 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace iflytop { +using namespace std; + +class I_XSyncUDP { + public: + typedef function onMessage_t; + + public: + virtual int initialize(uint32_t ip, int localport, onMessage_t onMessage) = 0; + virtual void sendto(uint32_t ip, int32_t dest_port, const char* data, int32_t length) = 0; + virtual ~I_XSyncUDP() {} + +}; + +class I_XSyncUDPFactory { + public: + virtual shared_ptr create() = 0; + virtual ~I_XSyncUDPFactory() {} +}; + +class Xsync { + private: + /* data */ + public: + Xsync(/* args */); + ~Xsync(); +}; + +} // namespace iflytop