Bitcoin ABC
0.34.3
P2P Digital Currency
Loading...
Searching...
No Matches
src
netmessagemaker.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2016 The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_NETMESSAGEMAKER_H
7
#define BITCOIN_NETMESSAGEMAKER_H
8
9
#include <
serialize.h
>
10
11
struct
CSerializedNetMsg
;
12
class
CVectorWriter;
13
14
namespace
NetMsg
{
15
template
<
typename
... Args>
16
CSerializedNetMsg
Make
(std::string msg_type, Args &&...args) {
17
CSerializedNetMsg
msg;
18
msg.m_type = std::move(msg_type);
19
VectorWriter
{msg.data, 0, std::forward<Args>(args)...};
20
return
msg;
21
}
22
}
// namespace NetMsg
23
24
#endif
// BITCOIN_NETMESSAGEMAKER_H
VectorWriter
Minimal stream for overwriting and/or appending to an existing byte vector.
Definition
streams.h:31
NetMsg
Definition
netmessagemaker.h:14
NetMsg::Make
CSerializedNetMsg Make(std::string msg_type, Args &&...args)
Definition
netmessagemaker.h:16
serialize.h
CSerializedNetMsg
Definition
net.h:122
Generated on Thu Nov 5 2026 21:14:03 for Bitcoin ABC by
1.9.8