[riot-notifications] [RIOT-OS/RIOT] gnrc_sock_tcp: add gnrc sock tcp (#16494)

benpicco notifications at github.com
Tue Aug 10 11:17:50 CEST 2021


@benpicco commented on this pull request.



> +    int timeout = atol(argv[1]);
+    unsigned to_receive = atol(argv[2]);

Would be nice if those were swapped

```suggestion
    int timeout = argv > 1 ? atol(argv[2]) : 0;
    unsigned to_receive = atol(argv[1]);
```

But I actually get stuck in a loop here if I try to read more than what's in the buffer:

```
> sock_tcp_read 100 10
sock_tcp_read: argc=3, argv[0] = sock_tcp_read, argv[1] = 100, argv[2] = 10
sock_tcp_read: received 10 It's worki
> sock_tcp_read 0 10
sock_tcp_read: argc=3, argv[0] = sock_tcp_read, argv[1] = 0, argv[2] = 10
sock_tcp_read: returns Unknown error -11
sock_tcp_read: returns Unknown error -11
sock_tcp_read: returns Unknown error -11
…
```

-- 
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/16494#pullrequestreview-726204420
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210810/7063b7d8/attachment.htm>


More information about the notifications mailing list