[#CMessageHeader-2constructor-0e4] = xref:CMessageHeader.adoc[CMessageHeader]::CMessageHeader :relfileprefix: ../ :mrdocs: Construct a P2P message header from message‐start characters, a message type and the size of the message. == Synopsis Declared in `<protocol.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- CMessageHeader( xref:MessageStartChars.adoc[MessageStartChars] const& pchMessageStartIn, char const* msg_type, unsigned int nMessageSizeIn); ---- == Description [NOTE] ==== Passing in a `msg_type` longer than MESSAGE_TYPE_SIZE will result in a run‐time assertion error. ==== == Parameters [cols="1,4"] |=== | Name| Description | *pchMessageStartIn* | Network magic bytes marking the start of the message. | *msg_type* | Null‐terminated message type string. | *nMessageSizeIn* | Size of the message payload in bytes. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#