picloud ping and fix big bugs

This commit is contained in:
2021-08-19 18:13:05 +03:00
parent f5af8a1da9
commit 4c0530d89a
13 changed files with 58 additions and 30 deletions

View File

@@ -25,10 +25,10 @@ PICloudClient::PICloudClient(const PIString & path, PIIODevice::DeviceMode mode)
tcp.setRole(PICloud::TCP::Client);
setName("cloud_client");
is_connected = false;
CONNECTL(&eth, connected, [this](){tcp.sendStart();});
CONNECTL(&eth, connected, [this](){opened_ = true; tcp.sendStart();});
CONNECTU(&streampacker, packetReceiveEvent, this, _readed);
CONNECTL(&eth, disconnected, [this](bool){
piCoutObj << "disconnected";
// piCoutObj << "disconnected";
opened_ = false;
is_connected = false;
cond_connect.notifyOne();