mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-22 10:31:45 +03:00
900b075e3a
on unix, but client screens don't simulate events other than mouse move. also not supporting clipboard at all yet and the main app is just a temporary framework to test with. must clean up protocol and communication.
34 lines
582 B
C++
34 lines
582 B
C++
#ifndef XSOCKET_H
|
|
#define XSOCKET_H
|
|
|
|
#include "XBase.h"
|
|
|
|
class XSocket : public XBase {
|
|
public:
|
|
// accessors
|
|
|
|
const char* getMessage() const { return m_msg; }
|
|
|
|
protected:
|
|
XSocket(const char* msg) : m_msg(msg) { }
|
|
|
|
private:
|
|
const char* m_msg;
|
|
};
|
|
|
|
#define XSOCKETDEF(_n) \
|
|
class _n : public XSocket { \
|
|
public: \
|
|
_n(const char* msg) : XSocket(msg) { } \
|
|
XNAME(_n) \
|
|
};
|
|
|
|
XSOCKETDEF(XSocketCreate)
|
|
XSOCKETDEF(XSocketName)
|
|
XSOCKETDEF(XSocketConnect)
|
|
XSOCKETDEF(XSocketListen)
|
|
XSOCKETDEF(XSocketAccept)
|
|
XSOCKETDEF(XSocketWrite)
|
|
|
|
#endif
|