picloud data send and receive, not tested

This commit is contained in:
2021-04-07 17:19:58 +03:00
parent fd2e0b2eed
commit 21e00e7176
5 changed files with 25 additions and 8 deletions

View File

@@ -37,11 +37,11 @@ public:
void setServerName(const PIString & server_name);
void setKeepConnection(bool on);
bool isConnected() const {return is_connected;}
protected:
bool openDevice();
bool closeDevice();
bool isConnected() const {return is_connected;}
int readDevice(void * read_to, int max_size);
int writeDevice(const void * data, int size);

View File

@@ -40,6 +40,7 @@ public:
friend class PICloudServer;
public:
Client(PICloudServer * srv = nullptr, uint id = 0);
virtual ~Client();
protected:
bool openDevice();
bool closeDevice();
@@ -53,6 +54,7 @@ public:
PIByteArray buff;
PIMutex mutex_buff;
PIConditionVariable cond_buff;
std::atomic_bool is_connected;
};
void setServerName(const PIString & server_name);