Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
proxy-io.h File Reference
#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>
Include dependency graph for proxy-io.h:
This graph shows which files directly or indirectly include this file:

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...
struct  mp::LogMessage
struct  mp::LogOptions
class  mp::Logger
class  mp::EventLoop
struct  mp::Waiter
class  mp::Connection
struct  mp::ServerVatId
struct  mp::ThreadContext

Namespaces

namespace  mp
 Functions to serialize / deserialize common bitcoin types.

Macros

#define MP_LOGPLAIN(loop, ...)
#define MP_LOG(loop, ...)

Typedefs

template<typename Interface, typename Params, typename Results>
using mp::ServerContext = ServerInvokeContext<ProxyServer<Interface>, ::capnp::CallContext<Params, Results>>
using mp::LogFn = std::function<void(LogMessage)>
using mp::ConnThreads = std::map<Connection*, std::optional<ProxyClient<Thread>>>
using mp::ConnThread = ConnThreads::iterator

Enumerations

enum class  mp::Log {
  mp::Trace = 0 , mp::Debug , mp::Info , mp::Warning ,
  mp::Error , mp::Raise
}
 Log flags. Update stringify function if changed! More...

Functions

kj::StringPtr mp::KJ_STRINGIFY (Log flags)
std::string mp::LongThreadName (const char *exe_name)
std::tuple< ConnThread, bool > mp::SetThread (GuardedRef< ConnThreads > threads, Connection *connection, const std::function< Thread::Client()> &make_thread)
template<typename InitInterface>
std::unique_ptr< ProxyClient< InitInterface > > mp::ConnectStream (EventLoop &loop, int fd)
template<typename InitInterface, typename InitImpl>
void mp::_Serve (EventLoop &loop, kj::Own< kj::AsyncIoStream > &&stream, InitImpl &init)
template<typename InitInterface, typename InitImpl>
void mp::_Listen (EventLoop &loop, kj::Own< kj::ConnectionReceiver > &&listener, InitImpl &init)
template<typename InitInterface, typename InitImpl>
void mp::ServeStream (EventLoop &loop, int fd, InitImpl &init)
template<typename InitInterface, typename InitImpl>
void mp::ListenConnections (EventLoop &loop, int fd, InitImpl &init)

Variables

ThreadContext mp::g_thread_context

Macro Definition Documentation

◆ MP_LOG

#define MP_LOG ( loop,
... )
Value:
MP_LOGPLAIN(loop, __VA_ARGS__) << "{" << LongThreadName((loop).m_exe_name) << "} "
#define MP_LOGPLAIN(loop,...)
Definition proxy-io.h:207

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

◆ MP_LOGPLAIN

#define MP_LOGPLAIN ( loop,
... )
Value:
if (mp::Logger logger{(loop).m_log_opts, __VA_ARGS__}; logger) logger

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