I think this is what you want:

https://github.com/capnproto/capnproto/blob/3f0fee61c65475c8debfdf8c01f96c2f7e7eeb14/c++/src/capnp/serialize.h#L102

:)

-Kenton

On Wed, May 6, 2020 at 2:54 PM <[email protected]> wrote:

> Is there a convenient way to peek at the size a message will take up on
> the wire? My thinking is to create a custom output stream that I
> `capnp::writeMessage` to that just sums everything but I feel like this
> could be done more efficiently within capn'n'proto, just couldn't find
> anything like that at first glance. Is there an obvious API missing? Would
> there be any interest in me putting up a diff with such an API?
>
> --
> 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/d47d474c-f268-4053-99ca-b2213a2e58d0%40googlegroups.com
> <https://groups.google.com/d/msgid/capnproto/d47d474c-f268-4053-99ca-b2213a2e58d0%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/CAJouXQkp34NagMnBH3DXNYuUO22j7G9wowm3h_ENc6V8okF2yg%40mail.gmail.com.

Reply via email to