Skip to content

Commit

Permalink
examples/dtls-sock: re-use handshake buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
benpicco committed Jan 11, 2024
1 parent 4085b7f commit f723f13
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/dtls-sock/dtls-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit f723f13

Please sign in to comment.