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
Magic
Magic value at the beginning of the header for format validation.
public uint Magic
Field Value
MagicValue
Magic value used to identify valid message headers ("EXMS" in ASCII).
public const uint MagicValue = 1163414867
Field Value
PayloadSize
Size of the serialized payload in bytes, excluding header size.
public int PayloadSize
Field Value
Timestamp
Unix timestamp indicating when the message was created or serialized.
public long Timestamp
Field Value
TypeId
Unique identifier for the message type to enable fast routing and deserialization.
public uint TypeId
Field Value
Version
Message format version for compatibility and evolution support.
public byte Version
Field Value
Methods
Equals(MessageHeader)
Determines whether the specified message header is equal to the current message header.
public readonly bool Equals(MessageHeader other)
Parameters
otherMessageHeaderThe 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
objobjectThe 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
leftMessageHeaderThe first message header to compare.
rightMessageHeaderThe 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
leftMessageHeaderThe first message header to compare.
rightMessageHeaderThe second message header to compare.
Returns
- bool
true if the message headers are not equal; otherwise, false.