diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-11-24 13:59:33 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2021-04-23 03:02:50 -0500 |
commit | 84934bf70e11fe4cda1cfda60113a54895d4fdd5 (patch) | |
tree | a76e8bd27d3e32a9f433d6f24857d6b96e499efc /src/ipc/capnp/echo.capnp | |
parent | 7d76cf667eff512043a28d4407cc89f58796c42b (diff) | |
download | bitcoin-84934bf70e11fe4cda1cfda60113a54895d4fdd5.tar.xz |
multiprocess: Add echoipc RPC method and test
Add simple interfaces::Echo IPC interface with one method that just takes and
returns a string, to test multiprocess framework and provide an example of how
it can be used to spawn and call between processes.
Diffstat (limited to 'src/ipc/capnp/echo.capnp')
-rw-r--r-- | src/ipc/capnp/echo.capnp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ipc/capnp/echo.capnp b/src/ipc/capnp/echo.capnp new file mode 100644 index 0000000000..df36ee0de3 --- /dev/null +++ b/src/ipc/capnp/echo.capnp @@ -0,0 +1,17 @@ +# Copyright (c) 2021 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +@0x888b4f7f51e691f7; + +using Cxx = import "/capnp/c++.capnp"; +$Cxx.namespace("ipc::capnp::messages"); + +using Proxy = import "/mp/proxy.capnp"; +$Proxy.include("interfaces/echo.h"); +$Proxy.include("ipc/capnp/echo.capnp.h"); + +interface Echo $Proxy.wrap("interfaces::Echo") { + destroy @0 (context :Proxy.Context) -> (); + echo @1 (context :Proxy.Context, echo: Text) -> (result :Text); +} |