Bitcoin Core  27.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
CNetMessage Class Reference

Transport protocol agnostic message container. More...

#include <net.h>

Collaboration diagram for CNetMessage:
[legend]

Public Member Functions

 CNetMessage (DataStream &&recv_in)
 
 CNetMessage (CNetMessage &&)=default
 
 CNetMessage (const CNetMessage &)=delete
 
CNetMessageoperator= (CNetMessage &&)=default
 
CNetMessageoperator= (const CNetMessage &)=delete
 

Public Attributes

DataStream m_recv
 received message data More...
 
std::chrono::microseconds m_time {0}
 time of message receipt More...
 
uint32_t m_message_size {0}
 size of the payload More...
 
uint32_t m_raw_message_size {0}
 used wire size of the message (including header/checksum) More...
 
std::string m_type
 

Detailed Description

Transport protocol agnostic message container.

Ideally it should only contain receive time, payload, type and size.

Definition at line 230 of file net.h.

Constructor & Destructor Documentation

◆ CNetMessage() [1/3]

CNetMessage::CNetMessage ( DataStream &&  recv_in)
inlineexplicit

Definition at line 239 of file net.h.

◆ CNetMessage() [2/3]

CNetMessage::CNetMessage ( CNetMessage &&  )
default

◆ CNetMessage() [3/3]

CNetMessage::CNetMessage ( const CNetMessage )
delete

Member Function Documentation

◆ operator=() [1/2]

CNetMessage& CNetMessage::operator= ( CNetMessage &&  )
default

◆ operator=() [2/2]

CNetMessage& CNetMessage::operator= ( const CNetMessage )
delete

Member Data Documentation

◆ m_message_size

uint32_t CNetMessage::m_message_size {0}

size of the payload

Definition at line 235 of file net.h.

◆ m_raw_message_size

uint32_t CNetMessage::m_raw_message_size {0}

used wire size of the message (including header/checksum)

Definition at line 236 of file net.h.

◆ m_recv

DataStream CNetMessage::m_recv

received message data

Definition at line 233 of file net.h.

◆ m_time

std::chrono::microseconds CNetMessage::m_time {0}

time of message receipt

Definition at line 234 of file net.h.

◆ m_type

std::string CNetMessage::m_type

Definition at line 237 of file net.h.


The documentation for this class was generated from the following file: