--
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 capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/dd7887fb-a1ac-498c-8589-4910d6d6d9cf%40googlegroups.com.
I noticed that when a reader object has been used once, the subsequent read will failed.
Is there some rewind operation need to be done just as the fread similar operation(i guess there may be some pointer internal)?
my code example:
kj::ArrayPtr<const kj::byte> byteArray((const kj::byte *) buf, (size_t) bufSize);
kj::ArrayInputStream arrayInputStream(byteArray);
kj::BufferedInputStreamWrapper input(arrayInputStream);
capnp::PackedMessageReader message(input);
maybe i need to rewind the inputstream to the begin so as to reuse the Reader object to retrive the target object?
Hi Fay,I'm not sure I understand your question. Reader objects are reusable. Is there some problem you're running into when trying to reuse a reader object?-Kenton
On Tue, Nov 5, 2019 at 2:16 AM Fay Wong <philip...@gmail.com> wrote:
Just as the mail title.--How could i reuse a reader object after i have consumed it once?I am implement a runtime mvvm ui engine, for example, <ul v-for="item in data.goodList" ...when data.goodList changes, i need to re-generate the structure of ul template, so i need to access the definition of the ul node at any time when user interact with my engine.BR,sid
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 capn...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/6fe4c17c-a04c-4811-ad0b-aa3f39929e8f%40googlegroups.com.