[riot-notifications] [RIOT-OS/RIOT] sock: tcp: fix sock_tcp_read() example (#16743)
notifications at github.com
Mon Aug 16 11:23:14 CEST 2021
Maybe it is worth to discuss the correct behaviour first.
But note: Both POSIX `read()` and `recv()` return 0 at end of file/stream. For that reason, they had to introduce non-error error-codes for nonblocking operation to indicate that no data is available yet. This kind of proves that not using an error code for EOF / closed connection was a bad idea. But still, since the SOCK API was modeled after BSD sockets, I think there will be some confusion with different behaviour.
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...
More information about the notifications