Bitcoin Core
32.1.0
P2P Digital Currency
Toggle main menu visibility
Loading...
Searching...
No Matches
src
ipc
libmultiprocess
include
mp
type-threadmap.h
Go to the documentation of this file.
1
// Copyright (c) The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef MP_PROXY_TYPE_THREADMAP_H
6
#define MP_PROXY_TYPE_THREADMAP_H
7
8
#include <
mp/util.h
>
9
10
namespace
mp
{
11
template
<>
12
struct
ProxyServer
<ThreadMap> final :
public
virtual
ThreadMap::Server
13
{
14
public
:
15
ProxyServer
(
Connection
& connection);
16
kj::Promise<void>
makeThread
(MakeThreadContext context)
override
;
17
kj::Promise<void>
makePool
(MakePoolContext context)
override
;
18
Connection
&
m_connection
;
19
};
20
21
template
<
typename
Output>
22
void
CustomBuildField
(
TypeList<>
,
23
Priority<1>
,
24
InvokeContext
& invoke_context,
25
Output&& output,
26
typename
std::enable_if<std::is_same<
decltype
(output.get()), ThreadMap::Client>::value>::type* enable =
nullptr
)
27
{
28
output.set(kj::heap<
ProxyServer<ThreadMap>
>(invoke_context.
connection
));
29
}
30
31
template
<
typename
Input>
32
decltype
(
auto
)
CustomReadField
(
TypeList<>
,
33
Priority<1>
,
34
InvokeContext
& invoke_context,
35
Input&& input,
36
typename
std::enable_if<std::is_same<
decltype
(input.get()), ThreadMap::Client>::value>::type* enable =
nullptr
)
37
{
38
invoke_context.
connection
.
m_thread_map
= input.get();
39
}
40
}
// namespace mp
41
42
#endif
// MP_PROXY_TYPE_THREADMAP_H
mp::Connection
Definition
proxy-io.h:436
mp::Connection::m_thread_map
ThreadMap::Client m_thread_map
Definition
proxy-io.h:487
util.h
mp
Functions to serialize / deserialize common bitcoin types.
Definition
common-types.h:58
mp::CustomReadField
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Definition
common-types.h:84
mp::CustomBuildField
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Definition
common-types.h:64
mp::InvokeContext
Definition
proxy-io.h:33
mp::InvokeContext::connection
Connection & connection
Definition
proxy-io.h:34
mp::Priority
Definition
util.h:115
mp::ProxyServer< ThreadMap >::ProxyServer
ProxyServer(Connection &connection)
Definition
proxy.cpp:418
mp::ProxyServer< ThreadMap >::makePool
kj::Promise< void > makePool(MakePoolContext context) override
Definition
proxy.cpp:420
mp::ProxyServer< ThreadMap >::makeThread
kj::Promise< void > makeThread(MakeThreadContext context) override
Definition
proxy.cpp:443
mp::ProxyServer< ThreadMap >::m_connection
Connection & m_connection
Definition
type-threadmap.h:18
mp::ProxyServer
Definition
proxy.h:28
mp::TypeList<>
Generated on
for Bitcoin Core by
1.18.0