Receiving message written by writev() in multiple chunks

Christian Helmuth christian.helmuth at ...1...
Tue Aug 15 11:26:38 CEST 2017


Hi Alexander,

I share your feeling that it may be better to adopt the behavior of
Linux and Android to stay on safe grounds. But on the other hand, I
could not find any reference which states that recv() will return a
complete TCP segment in all cases (only the opposite, e.g., [1]).
Please correct me if I'm wrong. Therefore, any application relying on
this fact would be broken. Regarding writev() to the local socket
buffer most implementations also seems to gather all data from the
iovec in one run. But, this is hidden from the receiver, which has to
expect that the data was fragmented on any network layer including the
syscall interface.

For these reasons, I suggest we leave the implementation as is for now.

[1] https://stackoverflow.com/questions/3198049/what-value-will-recv-return-if-it-receives-a-valid-tcp-packet-with-payload-siz

Greets
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list