We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 630756c commit b5a85b3Copy full SHA for b5a85b3
src/net.h
@@ -236,6 +236,14 @@ class CNetMessage {
236
std::string m_type;
237
238
CNetMessage(CDataStream&& recv_in) : m_recv(std::move(recv_in)) {}
239
+ // Only one CNetMessage object will exist for the same message on either
240
+ // the receive or processing queue. For performance reasons we therefore
241
+ // delete the copy constructor and assignment operator to avoid the
242
+ // possibility of copying CNetMessage objects.
243
+ CNetMessage(CNetMessage&&) = default;
244
+ CNetMessage(const CNetMessage&) = delete;
245
+ CNetMessage& operator=(CNetMessage&&) = default;
246
+ CNetMessage& operator=(const CNetMessage&) = delete;
247
248
void SetVersion(int nVersionIn)
249
{
0 commit comments