![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
#include <proxy-io.h>
Public Member Functions | |
ProxyClient (const ProxyClient &)=delete | |
~ProxyClient () | |
void | setDisconnectCallback (const std::function< void()> &fn) |
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. More... | |
![]() | |
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. More... | |
~ProxyClientBase () noexcept | |
Public Attributes | |
std::optional< CleanupIt > | 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. More... | |
![]() | |
Interface::Client | m_client |
ProxyContext | m_context |
Additional Inherited Members | |
![]() | |
using | Interface = Thread |
using | Impl = ::capnp::Void |
using | Sub = ProxyClient< Interface > |
using | Super = ProxyClientBase< Interface, Impl > |
![]() | |
static void | construct (Super &) |
static void | destroy (Super &) |
Definition at line 62 of file proxy-io.h.
|
delete |
mp::ProxyClient< Thread >::~ProxyClient | ( | ) |
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.
void mp::ProxyClient< Thread >::setDisconnectCallback | ( | const std::function< void()> & | fn | ) |
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 80 of file proxy-io.h.