3.16.5 Message Processing Events and Sequencing Rules
For the novice, there are several messages that are sent or can arrive during the entire process of requesting control (see section 2.2.2). When a message arrives, a string comparison can be used to determine the type of message that has arrived. The following sequence diagram shows the expected sequence of messages; any messages that arrive out of sequence SHOULD be ignored by the receiving side. All messages sent and received in this portion of the Remote Assistance Protocol are sent on the virtual channel named 71.
If the expert requests to assume control of the novice's mouse and keyboard, it does the following:
Sends the message <RCCOMMAND NAME="REMOTECTRLSTART"/> for version 1 of Remote Assistance.
Sends the Change Participant Control Level PDU (as specified in [MS-RDPEMC] section 2.2.4.3) with REQUEST_INTERACT set in the Flags field for version 2 and version 3 of Remote Assistance.
When the novice receives this message, this protocol provides for three different responses. If there is a local system setting that states that experts MUST NOT control the novice screen, the novice MUST send the response <RCCOMMAND NAME="DENIEDRC "/>. If the novice does not allow the expert to control the screen, the novice MUST send the response <RCCOMMAND NAME="REJECTRC"/>. The messages are exclusive with the DENIEDRC message superseding the REJECTRC message. If the novice does not allow the expert to control the screen, and the system does not allow for control to be taken, the DENIEDRC message MUST be sent, and the REJECTRC message MUST NOT be sent. If the novice allows the expert to have control of the screen, and the system settings do not deny the expert's request, the response <RCCOMMAND NAME="ACCEPTRC"/> MUST be sent. The novice is considered to be allowing the expert control of the screen at this point.
After receiving the ACCEPTRC message from the novice, the expert can expect two different messages from the novice, both of which signal that control has been ended by the novice. If the novice ended control by pressing the ESC key (Remote Assistance has the concept of a Panic Key, which is a key listened to system-wide that, when pressed, immediately revokes control. This key is implemented as the ESC key although any key can be chosen by the implementing application), the message <RCCOMMAND NAME="ESCRC"/> is received by the expert. If the novice wants to signal the end of control through any other means, the message <RCCOMMAND NAME="TAKECONTROL"/> is received by the expert. In either case, the expert is now considered to be only viewing the novice screen.
If the expert wants to end the control before receiving either of these messages, it sends the message <RCCOMMAND NAME="REMOTECTRLEND"/> to the novice to signal that it no longer wants to control the screen. After sending this message, the expert is only viewing the novice screen.
An example follows of the expert requesting to share control and the novice allowing it. After some indefinite time, the expert wants to stop controlling the novice screen and signals this to the novice.

Figure 17: Expert-requested desktop control (in Remote Assistance session)