40 while (!fns.empty()) {
41 auto fn = std::move(fns.front());
61 void reset(
bool relock=
false);
79template <
typename Interface_,
typename Impl_>
138template <
typename Interface,
typename Impl>
146template <
typename Interface_,
typename Impl_>
156 using Interface_::Server::thisCap;
195template <
typename Interface,
typename Impl>
222template <
class _Class,
class _Result,
class... _Params>
228 using Param =
typename std::tuple_element<N, std::tuple<_Params...>>::type;
230 std::conditional_t<std::is_same_v<void, Result>,
Params,
TypeList<_Params..., _Result>>;
257template <
typename MethodParams,
typename Enable =
void>
264 template <
typename ServerContext>
282template <
typename MethodParams>
284 :
public FunctionTraits<decltype(ProxyMethod<MethodParams>::impl)>
295template <
typename MethodParams>
302template <
typename MethodParams>
314template <
typename Field,
int flags>
325template <
typename Fn>
329template <
typename Result,
typename... Args>
EventLoopRef & operator=(const EventLoopRef &)=delete
EventLoopRef(EventLoopRef &&other) noexcept
EventLoopRef & operator=(EventLoopRef &&)=delete
EventLoopRef(EventLoop &loop, Lock *lock=nullptr)
void reset(bool relock=false)
EventLoopRef(const EventLoopRef &)=delete
EventLoop * operator->() const
EventLoop & operator*() const
virtual Result call(Args &&... args)=0
Wrapper around std::function for passing std::function objects between client and servers.
Interface::Client m_client
ProxyClient< Interface > Sub
ProxyClientBase< Interface, Impl > Super
~ProxyClientBase() noexcept
ProxyClientBase(typename Interface::Client client, Connection *connection, bool destroy_connection)
static void construct(Super &)
static void destroy(Super &)
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...
typename CleanupList::iterator CleanupIt
static constexpr int FIELD_OUT
static constexpr int FIELD_BOXED
static constexpr int FIELD_REQUESTED
ServerInvokeContext< ProxyServer< Interface >, ::capnp::CallContext< Params, Results > > ServerContext
static constexpr int FIELD_IN
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
static decltype(auto) Fwd(Param< N > &arg)
typename std::tuple_element< N, std::tuple< _Params... > >::type Param
TypeList< _Params... > Params
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)
static void invoke(ServerContext &)
ProxyServerBase(std::shared_ptr< Impl > impl, Connection &connection)
virtual ~ProxyServerBase()
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...
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.