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:
parent
4085b7f8a1
commit
f723f13641
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user