picloud ping and fix big bugs
This commit is contained in:
@@ -87,7 +87,7 @@ int PICloud::TCP::sendData(const PIByteArray & data) {
|
||||
PIByteArray ba;
|
||||
ba << header;
|
||||
ba.append(data);
|
||||
// piCout << "sendData" << ba.toHex();
|
||||
// piCout << "[PICloud::TCP] sendData" << ba.toHex();
|
||||
streampacker->send(ba);
|
||||
return data.size_s();
|
||||
}
|
||||
@@ -103,6 +103,15 @@ int PICloud::TCP::sendData(const PIByteArray & data, uint client_id) {
|
||||
}
|
||||
|
||||
|
||||
void PICloud::TCP::sendPing() {
|
||||
header.type = PICloud::TCP::Ping;
|
||||
PIByteArray ba;
|
||||
ba << header;
|
||||
ba.append(suuid);
|
||||
streampacker->send(ba);
|
||||
}
|
||||
|
||||
|
||||
PIPair<PICloud::TCP::Type, PICloud::TCP::Role> PICloud::TCP::parseHeader(PIByteArray & ba) {
|
||||
PIPair<PICloud::TCP::Type, PICloud::TCP::Role> ret;
|
||||
ret.first = InvalidType;
|
||||
|
||||
Reference in New Issue
Block a user