23template <
typename Interface>
27template <
typename Interface>
30template <
typename Params>
33template <
typename Struct>
36template <
typename Type>
43 while (!fns.empty()) {
44 auto fn = std::move(fns.front());
61template <
typename Interface_,
typename Impl_>
111template <
typename Interface,
typename Impl>
119template <
typename Interface_,
typename Impl_>
167template <
typename Interface,
typename Impl>
193template <
class _Class,
class _Result,
class... _Params>
199 using Param =
typename std::tuple_element<N, std::tuple<_Params...>>::type;
201 std::conditional_t<std::is_same_v<void, Result>,
Params,
TypeList<_Params..., _Result>>;
218template <
typename MethodParams,
typename Enable =
void>
225 template <
typename ServerContext>
243template <
typename MethodParams>
245 :
public FunctionTraits<decltype(ProxyMethod<MethodParams>::impl)>
256template <
typename MethodParams>
263template <
typename MethodParams>
275template <
typename Field,
int flags>
286template <
typename Fn>
290template <
typename Result,
typename... Args>
const CChainParams & Params()
Return the currently selected parameters.
Object holding network & rpc state associated with either an incoming server connection,...
virtual Result call(Args &&... args)=0
Wrapper around std::function for passing std::function objects between client and servers.
Base class for generated ProxyClient classes that implement a C++ interface and forward calls to a ca...
Interface::Client m_client
~ProxyClientBase() noexcept
ProxyClientBase(typename Interface::Client client, Connection *connection, bool destroy_connection)
static void construct(Super &)
static void destroy(Super &)
Customizable (through template specialization) base class used in generated ProxyClient implementatio...
Functions to serialize / deserialize common bitcoin types.
std::list< std::function< void()> > CleanupList
typename _Require< SfinaeExpr, Result >::Result Require
SFINAE helper, basically the same as to C++17's void_t, but allowing types other than void to be retu...
static constexpr int FIELD_OUT
ServerInvokeContext< ProxyServer< Interface >, ::capnp::CallContext< Params, Results > > ServerContext
static constexpr int FIELD_BOXED
static constexpr int FIELD_REQUESTED
static constexpr int FIELD_IN
typename CleanupList::iterator CleanupIt
void CleanupRun(CleanupList &fns)
static constexpr int FIELD_OPTIONAL
Accessor type holding flags that determine how to access a message field.
static const bool optional
static const bool requested
std::conditional_t< std::is_same_v< void, Result >, Params, TypeList< _Params..., _Result > > Fields
typename std::tuple_element< N, std::tuple< _Params... > >::type Param
Function traits class used to get method parameter and result types, used in generated ProxyClient an...
Mapping from capnp interface type to proxy client implementation (specializations are generated by pr...
Customizable (through template specialization) traits class used in generated ProxyClient implementat...
Context data associated with proxy client and server classes.
ProxyContext(Connection *connection)
Mapping from capnp method params type to method traits (specializations are generated by proxy-codege...
static decltype(auto) invoke(ServerContext &server_context, Args &&... args)
Traits class for a proxy method, providing the same Params/Result/Param/Fields described in the Funct...
static void invoke(ServerContext &)
Base class for generated ProxyServer classes that implement capnp server methods and forward calls to...
ProxyServerBase(std::shared_ptr< Impl > impl, Connection &connection)
void invokeDestroy()
If the capnp interface defined a special "destroy" method, as described the ProxyClientBase class,...
virtual ~ProxyServerBase()
ProxyServer destructor, called from the EventLoop thread by Cap'n Proto garbage collection code after...
std::shared_ptr< Impl > m_impl
Implementation pointer that may or may not be owned and deleted when this capnp server goes out of sc...
Customizable (through template specialization) base class which ProxyServer classes produced by gener...
Mapping from capnp interface type to proxy server implementation (specializations are generated by pr...
Customizable (through template specialization) traits class used in generated ProxyServer implementat...
Mapping from capnp struct type to struct traits (specializations are generated by proxy-codegen....
Mapping from local c++ type to capnp type and traits (specializations are generated by proxy-codegen....
ProxyServer & proxy_server
Generic utility functions used by capnp code.