tcpTest continued

This commit is contained in:
2020-11-11 18:37:53 +01:00
parent 8ea735ebac
commit 2ba8eebd97

View File

@ -80,6 +80,16 @@ void tcpTestHandler(void *handle) {
uint16_t s = getSn_RX_RSR(TCPTEST_SOCK);
coloredMsg(LOG_YELLOW, "tth, getSn_RxMAX returns %d", s);
if (s > 0) {
uint8_t buf = (uint8_t*) malloc(s);
res32 = recv(TCPTEST_SOCK, buf, s);
coloredMsg(LOG_YELLOW, "tth, recv returns 0x%02x", res32);
if (res32 > 0) {
coloredMsg(LOG_YELLOW, "tth, received: %s", buf);
}
free(buf);
}
break;
case 255: