Table of Contents

Struct MessageHeader

Namespace
Excalibur.Dispatch.Serialization
Assembly
Excalibur.Dispatch.dll

Fixed-size message header for zero-copy serialization.

[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MessageHeader : IEquatable<MessageHeader>
Implements
Inherited Members
Extension Methods

Fields

Checksum

Checksum value for data integrity verification of the payload.

public uint Checksum

Field Value

uint

Magic

Magic value at the beginning of the header for format validation.

public uint Magic

Field Value

uint

MagicValue

Magic value used to identify valid message headers ("EXMS" in ASCII).

public const uint MagicValue = 1163414867

Field Value

uint

PayloadSize

Size of the serialized payload in bytes, excluding header size.

public int PayloadSize

Field Value

int

Timestamp

Unix timestamp indicating when the message was created or serialized.

public long Timestamp

Field Value

long

TypeId

Unique identifier for the message type to enable fast routing and deserialization.

public uint TypeId

Field Value

uint

Version

Message format version for compatibility and evolution support.

public byte Version

Field Value

byte

Methods

Equals(MessageHeader)

Determines whether the specified message header is equal to the current message header.

public readonly bool Equals(MessageHeader other)

Parameters

other MessageHeader

The message header to compare with the current message header.

Returns

bool

true if the specified message header is equal to the current message header; otherwise, false.

Equals(object?)

Determines whether the specified object is equal to the current message header.

public override readonly bool Equals(object? obj)

Parameters

obj object

The object to compare with the current message header.

Returns

bool

true if the specified object is equal to the current message header; otherwise, false.

GetHashCode()

Returns the hash code for this message header.

public override readonly int GetHashCode()

Returns

int

A hash code for the current message header.

Operators

operator ==(MessageHeader, MessageHeader)

Determines whether two message headers are equal.

public static bool operator ==(MessageHeader left, MessageHeader right)

Parameters

left MessageHeader

The first message header to compare.

right MessageHeader

The second message header to compare.

Returns

bool

true if the message headers are equal; otherwise, false.

operator !=(MessageHeader, MessageHeader)

Determines whether two message headers are not equal.

public static bool operator !=(MessageHeader left, MessageHeader right)

Parameters

left MessageHeader

The first message header to compare.

right MessageHeader

The second message header to compare.

Returns

bool

true if the message headers are not equal; otherwise, false.