CMessageHeader::CMessageHeader

Constructors

Synopses

Declared in <protocol.h>

Constructs an empty message header.

constexpr
explicit
CMessageHeader() = default;
» more...

Construct a P2P message header from message-start characters, a message type and the size of the message.

CMessageHeader(
    MessageStartChars const& pchMessageStartIn,
    char const* msg_type,
    unsigned int nMessageSizeIn);
» more...

Parameters

NameDescription
pchMessageStartInNetwork magic bytes marking the start of the message.
msg_typeNull-terminated message type string.
nMessageSizeInSize of the message payload in bytes.