aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/net.h b/src/net.h
index a38310938b..05e71072e6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -99,15 +99,22 @@ struct AddedNodeInfo
class CNodeStats;
class CClientUIInterface;
-struct CSerializedNetMsg
-{
+struct CSerializedNetMsg {
CSerializedNetMsg() = default;
CSerializedNetMsg(CSerializedNetMsg&&) = default;
CSerializedNetMsg& operator=(CSerializedNetMsg&&) = default;
- // No copying, only moves.
+ // No implicit copying, only moves.
CSerializedNetMsg(const CSerializedNetMsg& msg) = delete;
CSerializedNetMsg& operator=(const CSerializedNetMsg&) = delete;
+ CSerializedNetMsg Copy() const
+ {
+ CSerializedNetMsg copy;
+ copy.data = data;
+ copy.m_type = m_type;
+ return copy;
+ }
+
std::vector<unsigned char> data;
std::string m_type;
};