[riot-notifications] [RIOT-OS/RIOT] examples: add TCP echo server & client from documentation (#16739)

Simon Brummer notifications at github.com
Sun Sep 19 06:50:23 CEST 2021


> > Shouldn't `gnrc_pktbuf` take care of holding the memory of the packet? Why do we need to copy it to a second buffer?
> 
> IIRC, the current `gnrc_tcp` implementation is not zero-copy. At some point you need to reassemble the TCP segments, so I guess this is where the second buffer comes in. Why `gnrc_pktbuf` is not used as the space where this happens, I cannot remember.

Exactly. The so called receive buffer holds the received payload until a user reads it. gnrc_pktbuf is only used to for packet data in transit. Keeping both seperate reduces the risk of running out of memory in gnrc_pktbuf in cases where the user does not read received data. This is important then multiple connections are used in parallel.

-- 
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/16739#issuecomment-922414901
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210918/18684aa9/attachment.htm>


More information about the notifications mailing list