Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <net.h>

+ Collaboration diagram for CNetMessage:

Public Member Functions

 CNetMessage (const CMessageHeader::MessageStartChars &pchMessageStartIn, int nTypeIn, int nVersionIn)
 
bool complete () const
 
const uint256GetMessageHash () const
 
void SetVersion (int nVersionIn)
 
int readHeader (const char *pch, unsigned int nBytes)
 
int readData (const char *pch, unsigned int nBytes)
 

Public Attributes

bool in_data
 
CDataStream hdrbuf
 
CMessageHeader hdr
 
unsigned int nHdrPos
 
CDataStream vRecv
 
unsigned int nDataPos
 
int64_t nTime
 

Private Attributes

CHash256 hasher
 
uint256 data_hash
 

Detailed Description

Definition at line 755 of file net.h.

Constructor & Destructor Documentation

◆ CNetMessage()

CNetMessage::CNetMessage ( const CMessageHeader::MessageStartChars pchMessageStartIn,
int  nTypeIn,
int  nVersionIn 
)
inline

Definition at line 771 of file net.h.

References hdrbuf, in_data, nDataPos, nHdrPos, nTime, and CDataStream::resize().

Member Function Documentation

◆ complete()

bool CNetMessage::complete ( ) const
inline

Definition at line 779 of file net.h.

References hdr, in_data, nDataPos, and CMessageHeader::nMessageSize.

Referenced by GetMessageHash(), and CNode::ReceiveMsgBytes().

◆ GetMessageHash()

const uint256 & CNetMessage::GetMessageHash ( ) const

◆ readData()

int CNetMessage::readData ( const char *  pch,
unsigned int  nBytes 
)

◆ readHeader()

int CNetMessage::readHeader ( const char *  pch,
unsigned int  nBytes 
)

Definition at line 900 of file net.cpp.

References hdr, hdrbuf, in_data, MAX_SIZE, memcpy(), nHdrPos, and CMessageHeader::nMessageSize.

Referenced by CNode::ReceiveMsgBytes().

◆ SetVersion()

void CNetMessage::SetVersion ( int  nVersionIn)
inline

Definition at line 788 of file net.h.

References hdrbuf, CDataStream::SetVersion(), and vRecv.

Referenced by PeerLogicValidation::ProcessMessages().

Member Data Documentation

◆ data_hash

uint256 CNetMessage::data_hash
mutableprivate

Definition at line 758 of file net.h.

Referenced by GetMessageHash().

◆ hasher

CHash256 CNetMessage::hasher
mutableprivate

Definition at line 757 of file net.h.

Referenced by GetMessageHash(), and readData().

◆ hdr

CMessageHeader CNetMessage::hdr

Definition at line 763 of file net.h.

Referenced by complete(), readData(), readHeader(), and CNode::ReceiveMsgBytes().

◆ hdrbuf

CDataStream CNetMessage::hdrbuf

Definition at line 762 of file net.h.

Referenced by CNetMessage(), readHeader(), and SetVersion().

◆ in_data

bool CNetMessage::in_data

Definition at line 760 of file net.h.

Referenced by CNetMessage(), complete(), readHeader(), and CNode::ReceiveMsgBytes().

◆ nDataPos

unsigned int CNetMessage::nDataPos

Definition at line 767 of file net.h.

Referenced by CNetMessage(), complete(), and readData().

◆ nHdrPos

unsigned int CNetMessage::nHdrPos

Definition at line 764 of file net.h.

Referenced by CNetMessage(), and readHeader().

◆ nTime

int64_t CNetMessage::nTime

Definition at line 769 of file net.h.

Referenced by CNetMessage(), and CNode::ReceiveMsgBytes().

◆ vRecv

CDataStream CNetMessage::vRecv

Definition at line 766 of file net.h.

Referenced by readData(), and SetVersion().


The documentation for this class was generated from the following files:
Released under the MIT license