diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-11-10 17:05:23 -0500 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-11-25 12:09:58 -0500 |
commit | 2ec935dcaab9557addcf73c33aa7f2db8cc01fee (patch) | |
tree | 3d5d7a29e05f457cee199fd273f24be8fd33550c /src/net.h | |
parent | b7695c2275d977f20343020f2e9ba5d746928a6e (diff) |
net: add CVectorWriter and CNetMsgMaker
CVectorWriter is useful for overwriting or appending an existing byte vector.
CNetMsgMaker is a shortcut for creating messages on-the-fly which are suitable
for pushing to CConnman.
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -101,6 +101,20 @@ class CTransaction; class CNodeStats; class CClientUIInterface; +struct CSerializedNetMsg +{ + CSerializedNetMsg() = default; + CSerializedNetMsg(CSerializedNetMsg&&) = default; + CSerializedNetMsg& operator=(CSerializedNetMsg&&) = default; + // No copying, only moves. + CSerializedNetMsg(const CSerializedNetMsg& msg) = delete; + CSerializedNetMsg& operator=(const CSerializedNetMsg&) = delete; + + std::vector<unsigned char> data; + std::string command; +}; + + class CConnman { public: |