[riot-notifications] [RIOT-OS/RIOT] sock/async: add function to retrieve session object of current DTLS event (#15755)

Martine Lenders notifications at github.com
Tue Jan 19 11:02:42 CET 2021

@miri64 requested changes on this pull request.

> + * @note Only available with @ref SOCK_HAS_ASYNC defined.
+ *       Should only be called within a DTLS event and only for the event
+ *       types @ref SOCK_ASYNC_CONN_RDY and @ref SOCK_ASYNC_CONN_FIN.

Mhhh maybe add a return value, that signals to the caller when the the session is available or not? I know this makes the implementation more complicated than it is now, but `sock` is an end-user API that is supposed to be easy to use. Could be boolean or an `errno`-based status code

> +/**
+ * @brief Information about remote client connected to the server
+ */
+struct sock_dtls_session {
+    session_t       dtls_session;    /**< TinyDTLS session */

Do you then want to maybe put it back where it was? ^^

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/20210119/28e161e9/attachment-0001.htm>

More information about the notifications mailing list