1.3.1.1 Message Flows

RemoteFX codec messages are transported in order over a lossless transport such as TCP/IP. The message syntax has been designed with this prerequisite.

There are two types of messages: (1) capability messages sent from the client to the server; and (2) encode stream messages sent from the server to the client. The encode stream messages can be broadly categorized as header or data messages. The syntax of each message is described in detail in section 2. Processing events and sequencing rules are described in section 3.

The message sequence is depicted in the following diagram. Note that the messages in this diagram are encapsulated in RDP wire structures (described in [MS-RDPBCGR] section 2.2) when sent on the wire – for the sake of simplicity only the RemoteFX messages are shown. The encapsulating RDP structures are referenced in sections 2 and 3 when describing the structure and processing of the RemoteFX messages.

The RemoteFX message sequence

Figure 2: The RemoteFX message sequence

The client initiates the session by sending a TS_RFX_CAPS Capabilities message (section 2.2.1.1). This is the only message sent from the client to the server; it lists the client-side support and preferences for various RemoteFX codec properties.

The server initializes its encoding state based on the client Capabilities message. It starts the encoding stream (section 2.2.2) by sending a sequence of Header Messages (section 2.2.2.2) that inform the client of the RemoteFX properties selected by the server:

  1. The TS_RFX_SYNC message (section 2.2.2.2.1) contains the RemoteFX magic number and the version of the wire format.

  2. The TS_RFX_CODEC_VERSIONS message (section 2.2.2.2.2) contains the version of the RemoteFX codec.

  3. The TS_RFX_CHANNELS message (section 2.2.2.2.3) lists the channel or multi-monitor information.

  4. The TS_RFX_CONTEXT message (section 2.2.2.2.4) contains the encoding properties of the stream.

The header messages are followed by the Data messages (section 2.2.2.3), which represent the sequence of encoded frames in the stream:

  1. The TS_RFX_FRAME_BEGIN and TS_RFX_FRAME_END messages (sections 2.2.2.3.1 and 2.2.2.3.2 respectively) are used to demarcate an encoded frame.

  2. The TS_RFX_REGION message (section 2.2.2.3.3) contains the list of rectangles that have been encoded.

  3. The TS_RFX_TILESET message (section 2.2.2.3.4) encapsulates the list of tiles that have been encoded.