![]() |
Bitcoin Core 29.99.0
P2P Digital Currency
|
#include <mp/proxy.h>
#include <mp/util.h>
#include <mp/proxy.capnp.h>
#include <capnp/rpc-twoparty.h>
#include <assert.h>
#include <condition_variable>
#include <functional>
#include <kj/function.h>
#include <map>
#include <memory>
#include <optional>
#include <sstream>
#include <string>
#include <thread>
Go to the source code of this file.
Classes | |
struct | mp::InvokeContext |
struct | mp::ClientInvokeContext |
struct | mp::ServerInvokeContext< ProxyServer, CallContext_ > |
struct | mp::ProxyClient< Thread > |
struct | mp::ProxyServer< Thread > |
class | mp::LoggingErrorHandler |
Handler for kj::TaskSet failed task events. More... | |
class | mp::Logger |
class | mp::EventLoop |
Event loop implementation. More... | |
struct | mp::Waiter |
Single element task queue used to handle recursive capnp calls. More... | |
class | mp::Connection |
Object holding network & rpc state associated with either an incoming server connection, or an outgoing client connection. More... | |
struct | mp::ServerVatId |
Vat id for server side of connection. More... | |
struct | mp::ThreadContext |
Namespaces | |
namespace | mp |
Functions to serialize / deserialize common bitcoin types. | |
Typedefs | |
template<typename Interface , typename Params , typename Results > | |
using | mp::ServerContext = ServerInvokeContext< ProxyServer< Interface >, ::capnp::CallContext< Params, Results > > |
using | mp::LogFn = std::function< void(bool raise, std::string message)> |
using | mp::ConnThreads = std::map< Connection *, ProxyClient< Thread > > |
using | mp::ConnThread = ConnThreads::iterator |
Functions | |
std::string | mp::LongThreadName (const char *exe_name) |
std::tuple< ConnThread, bool > | mp::SetThread (ConnThreads &threads, std::mutex &mutex, Connection *connection, const std::function< Thread::Client()> &make_thread) |
template<typename InitInterface > | |
std::unique_ptr< ProxyClient< InitInterface > > | mp::ConnectStream (EventLoop &loop, int fd) |
Given stream file descriptor, make a new ProxyClient object to send requests over the stream. More... | |
template<typename InitInterface , typename InitImpl > | |
void | mp::_Serve (EventLoop &loop, kj::Own< kj::AsyncIoStream > &&stream, InitImpl &init) |
Given stream and init objects, construct a new ProxyServer object that handles requests from the stream by calling the init object. More... | |
template<typename InitInterface , typename InitImpl > | |
void | mp::_Listen (EventLoop &loop, kj::Own< kj::ConnectionReceiver > &&listener, InitImpl &init) |
Given connection receiver and an init object, handle incoming connections by calling _Serve, to create ProxyServer objects and forward requests to the init object. More... | |
template<typename InitInterface , typename InitImpl > | |
void | mp::ServeStream (EventLoop &loop, int fd, InitImpl &init) |
Given stream file descriptor and an init object, handle requests on the stream by calling methods on the Init object. More... | |
template<typename InitInterface , typename InitImpl > | |
void | mp::ListenConnections (EventLoop &loop, int fd, InitImpl &init) |
Given listening socket file descriptor and an init object, handle incoming connections and requests by calling methods on the Init object. More... | |
Variables | |
thread_local ThreadContext | mp::g_thread_context |