Bitcoin Core
31.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
Connection
&
m_connection
;
18
};
19
20
template
<
typename
Output>
21
void
CustomBuildField
(
TypeList<>
,
22
Priority<1>
,
23
InvokeContext
& invoke_context,
24
Output&& output,
25
typename
std::enable_if<std::is_same<
decltype
(output.get()), ThreadMap::Client>::value>::type* enable =
nullptr
)
26
{
27
output.set(kj::heap<
ProxyServer<ThreadMap>
>(invoke_context.
connection
));
28
}
29
30
template
<
typename
Input>
31
decltype
(
auto
)
CustomReadField
(
TypeList<>
,
32
Priority<1>
,
33
InvokeContext
& invoke_context,
34
Input&& input,
35
typename
std::enable_if<std::is_same<
decltype
(input.get()), ThreadMap::Client>::value>::type* enable =
nullptr
)
36
{
37
invoke_context.
connection
.
m_thread_map
= input.get();
38
}
39
}
// namespace mp
40
41
#endif
// MP_PROXY_TYPE_THREADMAP_H
mp::Connection
Definition
proxy-io.h:423
mp::Connection::m_thread_map
ThreadMap::Client m_thread_map
Definition
proxy-io.h:474
util.h
mp
Functions to serialize / deserialize common bitcoin types.
Definition
common-types.h:57
mp::CustomReadField
decltype(auto) CustomReadField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Input &&input, ReadDest &&read_dest)
Definition
common-types.h:83
mp::CustomBuildField
void CustomBuildField(TypeList< LocalType >, Priority< 1 >, InvokeContext &invoke_context, Value &&value, Output &&output)
Definition
common-types.h:63
mp::InvokeContext
Definition
proxy-io.h:30
mp::InvokeContext::connection
Connection & connection
Definition
proxy-io.h:31
mp::Priority
Definition
util.h:109
mp::ProxyServer< ThreadMap >::ProxyServer
ProxyServer(Connection &connection)
Definition
proxy.cpp:410
mp::ProxyServer< ThreadMap >::makeThread
kj::Promise< void > makeThread(MakeThreadContext context) override
Definition
proxy.cpp:412
mp::ProxyServer< ThreadMap >::m_connection
Connection & m_connection
Definition
type-threadmap.h:17
mp::ProxyServer
Definition
proxy.h:28
mp::TypeList<>
Generated on
for Bitcoin Core by
1.17.0