Hi, Sorry, I don't understand what question you're asking here. You mention MallocMessageBuilder, which is used for building and outputting messages, but then you mention InputStreamReader. Are you trying to loop back data in-memory? You say you don't want to use writeMessageToFd() because you want to use streams. Have you looked at writeMessage(), which uses streams? Or is there a problem with that, too?
-Kenton On Fri, Mar 8, 2019 at 10:51 AM <[email protected]> wrote: > How do I read data from ::capnp::MallocMessageBuilder into > inputStreamReader.? I am trying to do : > > [code] > > kj::Array<::capnp::word> array = messageToFlatArray(message); > kj::ArrayInputStream stream(array); // this need kj::ArrayPtr > ::capnp::InputStreamMessageReader message1(stream); > auto msg_reader = message1.getRoot<A>(); > > [/code] > > I do not want to use `WriteMessageToFd". I want to achieve it using > streams. > > -- > 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]. > Visit this group at https://groups.google.com/group/capnproto. > -- 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]. Visit this group at https://groups.google.com/group/capnproto.
