Haven't looked at the code for the C++ implementation, but based on my
knowledge of the wire format[1] I would assume:

1. read() 4 bytes to get the number of segments
2. read() the list of segment sizes
3. readv() to read in all the segments

[1]: https://capnproto.org/encoding.html#serialization-over-a-stream

Quoting Sune Sash (2019-07-20 13:43:43)
>    Hello
>    I am new to cap'n'proto and came across this comment in serialize.h.�
>    "A multi-segment message can be read entirely in three system calls
>    with no buffering."
>    What are the 3 system calls involved? Also, I would like to understand
>    if this statement is true under zero-copy semantics.
>    Thanks
>    Shweta
>
>    --
>    You received this message because you are subscribed to the Google
>    Groups "Cap'n Proto" group.
>    To unsubscribe from this group and stop receiving emails from it, send
>    an email to [1][email protected].
>    To view this discussion on the web visit
>    [2]https://groups.google.com/d/msgid/capnproto/92d0c205-d5cc-4ecd-b1ff-
>    f514a0aa49c7%40googlegroups.com.
>
> Verweise
>
>    1. mailto:[email protected]
>    2. 
> https://groups.google.com/d/msgid/capnproto/92d0c205-d5cc-4ecd-b1ff-f514a0aa49c7%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/156364702914.5369.4249645648625880523%40localhost.localdomain.

Reply via email to