[#CMessageHeader-2constructor-0e7]
= xref:CMessageHeader.adoc[CMessageHeader]::CMessageHeader
:relfileprefix: ../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;protocol&period;h&gt;`

Constructs an empty message header&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
constexpr
explicit
xref:CMessageHeader/2constructor-05.adoc[CMessageHeader]() = default;
----

[.small]#xref:CMessageHeader/2constructor-05.adoc[_» more&period;&period;&period;_]#

Construct a P2P message header from message&hyphen;start characters, a message type and the size of the message&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:CMessageHeader/2constructor-0e4.adoc[CMessageHeader](
    xref:MessageStartChars.adoc[MessageStartChars] const& pchMessageStartIn,
    char const* msg&lowbar;type,
    unsigned int nMessageSizeIn);
----

[.small]#xref:CMessageHeader/2constructor-0e4.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pchMessageStartIn*
| Network magic bytes marking the start of the message&period;
| *msg&lowbar;type*
| Null&hyphen;terminated message type string&period;
| *nMessageSizeIn*
| Size of the message payload in bytes&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
