[riot-notifications] [RIOT-OS/RIOT] pkg/tinydtls: add DTLS sock API implementation (#11943)

benpicco notifications at github.com
Thu May 13 17:38:38 CEST 2021


@benpicco commented on this pull request.



> +struct sock_dtls {
+    dtls_context_t *dtls_ctx;               /**< TinyDTLS context for sock */
+    sock_udp_t *udp_sock;                   /**< Underlying UDP sock to use */

What was the reason for not doing
```suggestion
    sock_udp_t udp_sock;                    /**< Underlying UDP sock to use */
    dtls_context_t *dtls_ctx;               /**< TinyDTLS context for sock */
```
instead?

That way application code using UDP sockets could transparently handle DTLS sockets (after a custom setup procedure).
`sock_udp_t` would only need to be extended by a flag to indicate there is a DTLS context attached to it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11943#pullrequestreview-659034543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210513/0ed2dabc/attachment.htm>


More information about the notifications mailing list