2.2.3.3.1 Single Message Content

The message content follows the message frame. The message frame's ContentLength field indicates this with a value of 0 followed by an int32 value that indicates the length of the message content.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ProtocolId

MajorVersion

MinorVersion

OperationType

ContentLength (variable)

...

Headers (variable)

...

MessageContent (variable)

...

ProtocolId (4 bytes): This field contains an Int32 value that identifies the protocol. Its value MUST be hex 0x54454E2E.

MajorVersion (1 byte): This field contains a byte value that identifies the major version of the protocol. Its value MUST be 1.

MinorVersion (1 byte): This field contains a byte value that identifies the minor version of the protocol. Its value MUST be 0.

OperationType (2 bytes): The field is of type OperationType. This field identifies whether the message is for a One-Way Method or Two-Way Method and, if the message is for a Two-Way Method, the field identifies whether the message is a request message or reply message.

ContentLength (variable): A field that follows the operation field. This field is of variable length. It contains a UInt16 and can optionally contain an Int32.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

ContentDistribution

Length (optional)

...

ContentDistribution (2 bytes): A value that specifies whether the content is chunked or not. Its value MUST be 0.

Length (4 bytes): An Int32 value that specifies the length of the data in the message content. This field MUST be present if the ContentDistribution field is 0 (Not Chunked); otherwise, this field MUST NOT be present.

Headers (variable): A combination of frame header packets as defined in section Frame Headers (section 2.2.3.3.3).

MessageContent (variable): A stream of bytes that contains the content. The number of bytes in the stream MUST equal the value of the Length field of the ContentLength field of the message frame.