[#CMessageHeader]
= CMessageHeader
:mrdocs:

Message header&period; (4) message start&period; (12) message type&period; (4) size&period; (4) checksum&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CMessageHeader;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CMessageHeader/2constructor-0e7.adoc[`CMessageHeader`]         [.small]#[constructor]#
| Constructors
| xref:CMessageHeader/GetMessageType.adoc[`GetMessageType`] 
| Returns the message type as a string&period;
| xref:CMessageHeader/IsMessageTypeValid.adoc[`IsMessageTypeValid`] 
| Returns whether the message type field contains a valid, well&hyphen;formed value&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CMessageHeader/m_msg_type.adoc[`m&lowbar;msg&lowbar;type`] 
| Message type as a fixed&hyphen;width, null&hyphen;padded field&period;
| xref:CMessageHeader/nMessageSize.adoc[`nMessageSize`] 
| Size of the message payload in bytes&period;
| xref:CMessageHeader/pchChecksum.adoc[`pchChecksum`] 
| Checksum of the message payload&period;
| xref:CMessageHeader/pchMessageStart.adoc[`pchMessageStart`] 
| Network magic bytes marking the start of the message&period;
|===


== Static Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CMessageHeader/CHECKSUM_OFFSET.adoc[`CHECKSUM&lowbar;OFFSET`] 
| Byte offset of the checksum field within the header&period;
| xref:CMessageHeader/CHECKSUM_SIZE.adoc[`CHECKSUM&lowbar;SIZE`] 
| Number of bytes used for the payload checksum&period;
| xref:CMessageHeader/HEADER_SIZE.adoc[`HEADER&lowbar;SIZE`] 
| Total size of a serialized message header in bytes&period;
| xref:CMessageHeader/MESSAGE_SIZE_OFFSET.adoc[`MESSAGE&lowbar;SIZE&lowbar;OFFSET`] 
| Byte offset of the payload size field within the header&period;
| xref:CMessageHeader/MESSAGE_SIZE_SIZE.adoc[`MESSAGE&lowbar;SIZE&lowbar;SIZE`] 
| Number of bytes used to encode the payload size&period;
| xref:CMessageHeader/MESSAGE_TYPE_SIZE.adoc[`MESSAGE&lowbar;TYPE&lowbar;SIZE`] 
| Number of bytes reserved for the message type field&period;
|===



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