[riot-notifications] [RIOT-OS/RIOT] tinydtls: add `sock_async` support for `sock_dtls` (#12907)

Martine Lenders notifications at github.com
Mon May 25 18:51:10 CEST 2020

> tinydtls emits an event `DTLS_EVENT_CONNECTED` when a handshake is completed, but there are no application data decrypted. So the `sock_dtls_recv` in `SOCK_ASYNC_CONN_RECV` handler is not needed. The current code fails when calling `sock_dtls_recv` because there is no data to be received yet.
> But without the `sock_dtls_recv`, we now have another issue - we don't know which session to send the data to because the `sock_dtls_session_t` struct is not filled in for us. We need to have access to the members of `sock_dtls_session_t` that is passed to `sock_dtls_session_init`.

That's actually _why_ I call `sock_dtls_recv()`... is there a way to emit "data to complete handshake is available"? Otherwise, how should the user know when to call `sock_dtls_recv()` (which according to the spec introduced in #14043 they now need to after they call `session_init()`).

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200525/1107e87b/attachment.htm>

More information about the notifications mailing list