add events for ping / pong rx #382

This commit is contained in:
Links
2019-05-30 20:15:03 +02:00
parent df3ef524b6
commit 0aa07421a6
5 changed files with 25 additions and 7 deletions

View File

@ -45,7 +45,15 @@ void webSocketEvent(WStype_t type, uint8_t * payload, size_t length) {
// send data to server
// webSocket.sendBIN(payload, length);
break;
}
case WStype_PING:
// pong will be send automatically
USE_SERIAL.printf("[WSc] get ping\n");
break;
case WStype_PONG:
// answer to a ping we send
USE_SERIAL.printf("[WSc] get pong\n");
break;
}
}