![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
#include <proxy-io.h>
Public Member Functions | |
ProxyClient (const ProxyClient &)=delete | |
~ProxyClient () | |
void | setCleanup (const std::function< void()> &fn) |
ProxyClientBase (typename Interface::Client client, Connection *connection, bool destroy_connection) | |
![]() | |
ProxyClientBase (typename Interface::Client client, Connection *connection, bool destroy_connection) | |
~ProxyClientBase () noexcept | |
Public Attributes | |
std::optional< CleanupIt > | m_cleanup_it |
Cleanup function to run when the connection is closed. 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 59 of file proxy-io.h.
|
delete |
mp::ProxyClient< Thread >::~ProxyClient | ( | ) |
mp::ProxyClientBase< Interface, Impl >::ProxyClientBase | ( | typename Interface::Client | client, |
Connection * | connection, | ||
bool | destroy_connection | ||
) |
Definition at line 70 of file proxy-io.h.
void mp::ProxyClient< Thread >::setCleanup | ( | const std::function< void()> & | fn | ) |
std::optional<CleanupIt> mp::ProxyClient< Thread >::m_cleanup_it |
Cleanup function to run when the connection is closed.
If the Connection gets destroyed before this ProxyClient<Thread> object, this cleanup callback lets it destroy this object and remove its entry in the thread's request_threads or callback_threads map (after resetting m_cleanup_it so the destructor does not try to access it). But if this object gets destroyed before the Connection, there's no need to run the cleanup function and the destructor will unregister it.
Definition at line 75 of file proxy-io.h.