Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
V1TransportDeserializer Class Referencefinal

#include <net.h>

Inheritance diagram for V1TransportDeserializer:
[legend]
Collaboration diagram for V1TransportDeserializer:
[legend]

Public Member Functions

 V1TransportDeserializer (const CChainParams &chain_params, const NodeId node_id, int nTypeIn, int nVersionIn)
 
bool Complete () const override
 
void SetVersion (int nVersionIn) override
 
int Read (Span< const uint8_t > &msg_bytes) override
 read and deserialize data, advances msg_bytes data pointer More...
 
CNetMessage GetMessage (std::chrono::microseconds time, bool &reject_message) override
 
- Public Member Functions inherited from TransportDeserializer
virtual ~TransportDeserializer ()
 

Private Member Functions

const uint256GetMessageHash () const
 
int readHeader (Span< const uint8_t > msg_bytes)
 
int readData (Span< const uint8_t > msg_bytes)
 
void Reset ()
 

Private Attributes

const CChainParamsm_chain_params
 
const NodeId m_node_id
 
CHash256 hasher
 
uint256 data_hash
 
bool in_data
 
CDataStream hdrbuf
 
CMessageHeader hdr
 
CDataStream vRecv
 
unsigned int nHdrPos
 
unsigned int nDataPos
 

Detailed Description

Definition at line 315 of file net.h.

Constructor & Destructor Documentation

◆ V1TransportDeserializer()

V1TransportDeserializer::V1TransportDeserializer ( const CChainParams chain_params,
const NodeId  node_id,
int  nTypeIn,
int  nVersionIn 
)
inline

Definition at line 345 of file net.h.

Here is the call graph for this function:

Member Function Documentation

◆ Complete()

bool V1TransportDeserializer::Complete ( ) const
inlineoverridevirtual

Implements TransportDeserializer.

Definition at line 354 of file net.h.

Here is the caller graph for this function:

◆ GetMessage()

CNetMessage V1TransportDeserializer::GetMessage ( std::chrono::microseconds  time,
bool &  reject_message 
)
overridevirtual

Implements TransportDeserializer.

Definition at line 741 of file net.cpp.

Here is the call graph for this function:

◆ GetMessageHash()

const uint256 & V1TransportDeserializer::GetMessageHash ( ) const
private

Definition at line 733 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Read()

int V1TransportDeserializer::Read ( Span< const uint8_t > &  msg_bytes)
inlineoverridevirtual

read and deserialize data, advances msg_bytes data pointer

Implements TransportDeserializer.

Definition at line 365 of file net.h.

Here is the call graph for this function:

◆ readData()

int V1TransportDeserializer::readData ( Span< const uint8_t >  msg_bytes)
private

Definition at line 716 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readHeader()

int V1TransportDeserializer::readHeader ( Span< const uint8_t >  msg_bytes)
private

Definition at line 676 of file net.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Reset()

void V1TransportDeserializer::Reset ( )
inlineprivate

Definition at line 333 of file net.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVersion()

void V1TransportDeserializer::SetVersion ( int  nVersionIn)
inlineoverridevirtual

Implements TransportDeserializer.

Definition at line 360 of file net.h.

Here is the call graph for this function:

Member Data Documentation

◆ data_hash

uint256 V1TransportDeserializer::data_hash
mutableprivate

Definition at line 321 of file net.h.

◆ hasher

CHash256 V1TransportDeserializer::hasher
mutableprivate

Definition at line 320 of file net.h.

◆ hdr

CMessageHeader V1TransportDeserializer::hdr
private

Definition at line 324 of file net.h.

◆ hdrbuf

CDataStream V1TransportDeserializer::hdrbuf
private

Definition at line 323 of file net.h.

◆ in_data

bool V1TransportDeserializer::in_data
private

Definition at line 322 of file net.h.

◆ m_chain_params

const CChainParams& V1TransportDeserializer::m_chain_params
private

Definition at line 318 of file net.h.

◆ m_node_id

const NodeId V1TransportDeserializer::m_node_id
private

Definition at line 319 of file net.h.

◆ nDataPos

unsigned int V1TransportDeserializer::nDataPos
private

Definition at line 327 of file net.h.

◆ nHdrPos

unsigned int V1TransportDeserializer::nHdrPos
private

Definition at line 326 of file net.h.

◆ vRecv

CDataStream V1TransportDeserializer::vRecv
private

Definition at line 325 of file net.h.


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