Quoting r.a.m...@gmail.com (2018-11-04 12:58:16) > interface AccountManager { > echo @0 (title: Text) -> (result: Text); > list @1 () -> (accounts : List(Text)); > # get @1 (title: Text) -> (account: Account); > }
This looks fine. > also I use following code for my server implementation: > ::kj::Promise<void> list(ListContext context) override { > auto lst = capnp::List< capnp::Text>::Builder(); > lst.set(0, "reza"); > context.getResults().setAccounts(lst); > return kj::READY_NOW; > } I'm less familiar with the C++ API than some of the other implementations, but I assume you have to specify the length of the list you're creating somehow -- capnp won't resize them on demand the way std::vector does. My guess is you're just getting a standard out of bounds error in your call to lst.set(). -- 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+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/capnproto.