Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <net.h>
Public Member Functions | |
CNetMessage (const CMessageHeader::MessageStartChars &pchMessageStartIn, int nTypeIn, int nVersionIn) | |
bool | complete () const |
const uint256 & | GetMessageHash () 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
Constructor & Destructor Documentation
◆ CNetMessage()
|
inline |
Member Function Documentation
◆ complete()
|
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 |
Definition at line 948 of file net.cpp.
References base_blob< BITS >::begin(), complete(), data_hash, CHash256::Finalize(), hasher, and base_blob< BITS >::IsNull().
◆ readData()
int CNetMessage::readData | ( | const char * | pch, |
unsigned int | nBytes | ||
) |
Definition at line 931 of file net.cpp.
References hasher, hdr, memcpy(), nDataPos, CMessageHeader::nMessageSize, CDataStream::resize(), CDataStream::size(), vRecv, and CHash256::Write().
Referenced by CNode::ReceiveMsgBytes().
◆ 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()
|
inline |
Definition at line 788 of file net.h.
References hdrbuf, CDataStream::SetVersion(), and vRecv.
Referenced by PeerLogicValidation::ProcessMessages().
Member Data Documentation
◆ data_hash
|
mutableprivate |
Definition at line 758 of file net.h.
Referenced by GetMessageHash().
◆ 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: