improve ram usage on one char send

This commit is contained in:
Links
2018-05-12 15:27:08 +02:00
parent d2043bf8ef
commit 8967356af3
2 changed files with 4 additions and 2 deletions

View File

@ -216,7 +216,9 @@ bool WebSocketsClient::sendTXT(String & payload) {
}
bool WebSocketsClient::sendTXT(char payload) {
return sendTXT((uint8_t *) &payload, 1);
uint8_t buf[WEBSOCKETS_MAX_HEADER_SIZE + 2] = {0x00};
buf[WEBSOCKETS_MAX_HEADER_SIZE] = payload;
return sendTXT(buf, 1, true);
}
/**