1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 06:12:43 +01:00

examples/dtls-sock: re-use handshake buffer

This commit is contained in:
Benjamin Valentin 2023-11-30 16:37:51 +01:00
parent 4085b7f8a1
commit f723f13641

View File

@ -151,11 +151,10 @@ static int client_send(char *addr_str, char *data, size_t datalen)
else {
printf("Sent DTLS message\n");
uint8_t rcv[512];
if ((res = sock_dtls_recv(&dtls_sock, &session, rcv, sizeof(rcv),
if ((res = sock_dtls_recv(&dtls_sock, &session, buf, sizeof(buf),
SOCK_NO_TIMEOUT)) >= 0) {
printf("Received %" PRIdSIZE " bytes: \"%.*s\"\n", res, (int)res,
(char *)rcv);
(char *)buf);
}
}