Yes, the "calculator" sample program does this, where the client can send the server a `Function` implementation, and the server calls back to it.
https://github.com/capnproto/capnproto/tree/master/c++/samples The trick here is that any message (including parameters or results of an RPC call) can contain references to new objects (`interface` types). If the client creates an implementation of an RPC interface and then sends it to the server via some other call, then the server can call back to that object. -Kenton On Thu, Oct 24, 2019 at 11:25 PM 林晓锋 <[email protected]> wrote: > Hi, @all: > It is mentioned that "Requests and responses can go in any > direction." at FAQ (https://capnproto.org/faq.html) , I would like to > know is there any example of the server start requests to the client? > > -- > 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/adcd84af-4385-49e0-a08b-08c7241e48a2%40googlegroups.com > <https://groups.google.com/d/msgid/capnproto/adcd84af-4385-49e0-a08b-08c7241e48a2%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/CAJouXQ%3DZ846CCZiw9ZGzMQ2ohyRSHK2aUR5Mzou6heZb%3DPuNmQ%40mail.gmail.com.
