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 Nov 30, 2023
1 parent de89f7f commit 76ba0b5
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 @@ -148,11 +148,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 %d bytes: \"%.*s\"\n", (int)res, (int)res,
(char *)rcv);
(char *)buf);
}
}

Expand Down

0 comments on commit 76ba0b5

Please sign in to comment.