PICloud connect/disconnect
This commit is contained in:
@@ -53,6 +53,24 @@ void PICloud::TCP::sendStart(PIEthernet * eth) {
|
||||
}
|
||||
|
||||
|
||||
void PICloud::TCP::sendConnected(PIEthernet * eth, uint client_id) {
|
||||
header.type = PICloud::TCP::Connect;
|
||||
PIByteArray ba;
|
||||
ba << header << client_id;
|
||||
eth->send(ba);
|
||||
}
|
||||
|
||||
|
||||
void PICloud::TCP::sendData(PIEthernet * eth, const PIByteArray & data) {
|
||||
header.type = PICloud::TCP::Data;
|
||||
PIByteArray ba;
|
||||
ba << header;
|
||||
ba.append(data);
|
||||
// piCout << "sendData" << ba.toHex();
|
||||
eth->send(ba);
|
||||
}
|
||||
|
||||
|
||||
PIPair<PICloud::TCP::Type, PICloud::TCP::Role> PICloud::TCP::parseHeader(PIByteArray & ba) {
|
||||
PIPair<PICloud::TCP::Type, PICloud::TCP::Role> ret;
|
||||
ret.first = Invalid;
|
||||
|
||||
Reference in New Issue
Block a user