You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
817 B
40 lines
817 B
#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
|