Browse Source

update

xsync_v2
zhaohe 2 years ago
parent
commit
333fd931c4
  1. 3
      .gitmodules
  2. 1
      iflytop_xsync_protocol
  3. 9
      xsync.cpp
  4. 40
      xsync.hpp

3
.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

1
iflytop_xsync_protocol

@ -0,0 +1 @@
Subproject commit dd0c38c767378dbe9010cd7e94bf1bf7cf0e40d5

9
xsync.cpp

@ -0,0 +1,9 @@
#include "xsync.hpp"
using namespace iflytop;
Xsync::Xsync(/* args */) {
}
Xsync::~Xsync() {
}

40
xsync.hpp

@ -0,0 +1,40 @@
#pragma once
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <set>
#include <sstream>
#include <string>
#include <vector>
namespace iflytop {
using namespace std;
class I_XSyncUDP {
public:
typedef function<void(uint32_t ip, int32_t fromport, uint8_t* data, size_t length)> 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<I_XSyncUDP> create() = 0;
virtual ~I_XSyncUDPFactory() {}
};
class Xsync {
private:
/* data */
public:
Xsync(/* args */);
~Xsync();
};
} // namespace iflytop
Loading…
Cancel
Save