Changeset View
Changeset View
Standalone View
Standalone View
src/netmessagemaker.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_NETMESSAGEMAKER_H | #ifndef BITCOIN_NETMESSAGEMAKER_H | ||||
#define BITCOIN_NETMESSAGEMAKER_H | #define BITCOIN_NETMESSAGEMAKER_H | ||||
#include <net.h> | |||||
#include <serialize.h> | #include <serialize.h> | ||||
struct CSerializedNetMsg; | |||||
class CVectorWriter; | |||||
class CNetMsgMaker { | class CNetMsgMaker { | ||||
public: | public: | ||||
explicit CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn) {} | explicit CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn) {} | ||||
template <typename... Args> | template <typename... Args> | ||||
CSerializedNetMsg Make(int nFlags, std::string msg_type, | CSerializedNetMsg Make(int nFlags, std::string msg_type, | ||||
Args &&... args) const { | Args &&... args) const { | ||||
CSerializedNetMsg msg; | CSerializedNetMsg msg; | ||||
Show All 16 Lines |