Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
mp::ProxyClient< Thread > Struct Reference

#include <proxy-io.h>

Inheritance diagram for mp::ProxyClient< Thread >:
[legend]
Collaboration diagram for mp::ProxyClient< Thread >:
[legend]

Public Member Functions

 ProxyClient (const ProxyClient &)=delete
 ~ProxyClient ()
 ProxyClientBase (typename Interface::Client client, Connection *connection, bool destroy_connection)
Public Member Functions inherited from mp::ProxyClientBase< Thread, ::capnp::Void >
 ProxyClientBase (typename Interface::Client client, Connection *connection, bool destroy_connection)
 ~ProxyClientBase () noexcept

Public Attributes

std::optional< CleanupItm_disconnect_cb
Public Attributes inherited from mp::ProxyClientBase< Thread, ::capnp::Void >
Interface::Client m_client
ProxyContext m_context

Additional Inherited Members

Public Types inherited from mp::ProxyClientBase< Thread, ::capnp::Void >
using Interface
using Impl
using Sub
using Super
Static Public Member Functions inherited from mp::ProxyClientBase< Thread, ::capnp::Void >
static void construct (Super &)
static void destroy (Super &)

Detailed Description

Definition at line 75 of file proxy-io.h.

Constructor & Destructor Documentation

◆ ProxyClient()

mp::ProxyClient< Thread >::ProxyClient ( const ProxyClient< Thread > & )
delete
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~ProxyClient()

mp::ProxyClient< Thread >::~ProxyClient ( )

Definition at line 351 of file proxy.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ ProxyClientBase()

mp::ProxyClientBase< Interface, Impl >::ProxyClientBase ( typename Interface::Client client,
Connection * connection,
bool destroy_connection )

Construct libmultiprocess client object wrapping Cap'n Proto client object with a reference to the associated mp::Connection object.

The destroy_connection option determines whether destroying this client object closes the connection. It is set to true for the ProxyClient<InitInterface> object returned by ConnectStream, to let IPC clients close the connection by freeing the object. It is false for other client objects so they can be destroyed without affecting the connection.

Definition at line 97 of file proxy-io.h.

Member Data Documentation

◆ m_disconnect_cb

std::optional<CleanupIt> mp::ProxyClient< Thread >::m_disconnect_cb

Reference to callback function that is run if there is a sudden disconnect and the Connection object is destroyed before this ProxyClient<Thread> object. The callback will destroy this object and remove its entry from the thread's request_threads or callback_threads map. It will also reset m_disconnect_cb so the destructor does not access it. In the normal case where there is no sudden disconnect, the destructor will unregister m_disconnect_cb so the callback is never run. Since this variable is accessed from multiple threads, accesses should be guarded with the associated Waiter::m_mutex.

Definition at line 91 of file proxy-io.h.


The documentation for this struct was generated from the following files: