3.1.5 Processing Events and Sequencing Rules

Establishing the connection: RemoteFX capabilities messages are exchanged to establish the encoding properties used by the server, as specified in sections 3.1.3 and 3.1.5.1. A compliant server MUST process the TS_RFX_CLNT_CAPS_CONTAINER message as specified in section 3.1.5.1 before RemoteFX encoding can begin.

Sending RemoteFX encoded data: RemoteFX encoded data is sent to the client as a sequence of the RemoteFX messages defined in section 2.2.2. A compliant server MUST always send the encoded messages in the correct order, as specified in section 3.1.8.3.1.

Header messages: The encoded message sequence MUST include header messages, as specified in section 3.1.8.3.1.

Header messages contain information about the encoding properties used for encoding data messages, and are used by the client to decode the message stream. Header messages MUST always specify the encoding properties initialized and stored in OperationalMode and EntropyAlgorithm. The encode header and data message sequences are shown in the figures Generation of RemoteFX encode header messages and Generation of RemoteFX encode data messages (section 3.1.8.3.1).

Header messages can appear multiple times within the message stream, depending on the OperationalMode property:

  • If the encoder is initialized with OperationalMode set to video mode, then it MUST send the encode header message sequence at the start of the stream. The encode header message sequence is then followed by an arbitrary number of encode data message sequences.

  • If the encoder is initialized with OperationalMode set to image mode, then it MUST send the encode header message sequence before every encode data message sequence.

Entropy Algorithm: The server MUST use the entropy algorithm, initialized and stored in EntropyAlgorithm, to encode every data message in the encoded data stream.

Error conditions: If the client receives an out-of-sequence, unspecified, or malformed message, then the client MUST treat this as an error and terminate the RDP connection.