Class SoMessageHeader
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Inheritance
Inherited Members
Namespace: SuperOffice.Messaging.Messages
Assembly: SoDataBase.dll
Syntax
public class SoMessageHeader : SoMessagePreHeader
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
Constructors
SoMessageHeader()
Constructor used by serializer.
Declaration
public SoMessageHeader()
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
SoMessageHeader(SoMessageType, Guid)
Constructur used by sub-classes to initialize the header.
Declaration
protected SoMessageHeader(SoMessageType messageType, Guid sourceId)
Parameters
Type | Name | Description |
---|---|---|
SoMessageType | messageType | Type of Message. |
Guid | sourceId | Source ID (GUID) of the sender of the message. |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
Fields
BodySize
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public uint BodySize
Field Value
Type | Description |
---|---|
UInt32 |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
HeaderSize
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public uint HeaderSize
Field Value
Type | Description |
---|---|
UInt32 |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
MessageId
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public Guid MessageId
Field Value
Type | Description |
---|---|
Guid |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
MessageType
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public SoMessageType MessageType
Field Value
Type | Description |
---|---|
SoMessageType |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
SourceId
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public Guid SourceId
Field Value
Type | Description |
---|---|
Guid |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
TargetId
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public Guid TargetId
Field Value
Type | Description |
---|---|
Guid |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
Properties
Description
Get description about the message. Default description is the first 253 characters of the full name of the message's type.
Declaration
public virtual string Description { get; }
Property Value
Type | Description |
---|---|
String |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
Methods
IsForMe(Guid)
Check if the message is valid and is intended for the provided source id.
Declaration
public bool IsForMe(Guid sourceId)
Parameters
Type | Name | Description |
---|---|---|
Guid | sourceId | Source ID to check against. |
Returns
Type | Description |
---|---|
Boolean | True if the message is intended for the provided source id. |
Remarks
Broadcast messages will show that they are intended for any source id.
IsValidate()
Verify if the header is valid
Declaration
public virtual bool IsValidate()
Returns
Type | Description |
---|---|
Boolean | True if the header is valid. |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.
PrepareDatabaseMessage(MessageRow)
This is the first and current version of the SuperOffice Network header and immidiatly precedes the SoMessagePreHeader.
Declaration
public virtual bool PrepareDatabaseMessage(MessageRow row)
Parameters
Type | Name | Description |
---|---|---|
MessageRow | row |
Returns
Type | Description |
---|---|
Boolean |
Remarks
Maximum size for an UDP packet is 1472 bytes. Using 96 bytes for the header leaves 1376 bytes for the message itself.
This should be the base class for all Messages sent over the network.