CMessageHeader

Message header. (4) message start. (12) message type. (4) size. (4) checksum.

Synopsis

Declared in <protocol.h>

class CMessageHeader;

Member Functions

NameDescription
CMessageHeader [constructor]Constructors
GetMessageType Returns the message type as a string.
IsMessageTypeValid Returns whether the message type field contains a valid, well-formed value.

Data Members

NameDescription
m_msg_type Message type as a fixed-width, null-padded field.
nMessageSize Size of the message payload in bytes.
pchChecksum Checksum of the message payload.
pchMessageStart Network magic bytes marking the start of the message.

Static Data Members

NameDescription
CHECKSUM_OFFSET Byte offset of the checksum field within the header.
CHECKSUM_SIZE Number of bytes used for the payload checksum.
HEADER_SIZE Total size of a serialized message header in bytes.
MESSAGE_SIZE_OFFSET Byte offset of the payload size field within the header.
MESSAGE_SIZE_SIZE Number of bytes used to encode the payload size.
MESSAGE_TYPE_SIZE Number of bytes reserved for the message type field.