[riot-notifications] [RIOT-OS/RIOT] sock_dtls: add timeout to sock_dtls_send and add sock_dtls_session_init (#14043)

Aiman Ismail notifications at github.com
Tue May 19 12:55:14 CEST 2020

I pushed a "fix" for the hang problem but that's causing the client to always print 0 received bytes. I know why this happens but I think our main issue is the return value of `sock_dtls_recv()`. 

When the function returns 0, the server doesn't know if it's because a new client is connected or a client sent an empty message. In the test that you did, the server ignores any message with length 0 causing the client to wait indefinitely for the echo message from the server.

I think we need a way to differentiate that a new client connected and empty messages. Is there any other value that we can use for the return in `sock_dtls_recv()` to indicate that a new client is connected?

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/20200519/6a80690d/attachment-0001.htm>

More information about the notifications mailing list