From 2ba8eebd972786e8f9b37cbd716d538ea5a0f871 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Wed, 11 Nov 2020 18:37:53 +0100 Subject: [PATCH] tcpTest continued --- cube/User/Src/tcpTest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cube/User/Src/tcpTest.c b/cube/User/Src/tcpTest.c index d355246..f290239 100644 --- a/cube/User/Src/tcpTest.c +++ b/cube/User/Src/tcpTest.c @@ -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: