3.1.5 Message Processing Events and Sequencing Rules
Figure 7: State transition diagram
The state transition diagram summarizes the message sequencing rules for the Remote Desktop Protocol: Audio Output Virtual Channel Extension. The following are the descriptions of each of the arrows:
Event: connected from client.
Action: server sends Server Audio Formats and Version PDU.
Event: server receives Client Audio Formats and Version PDU.
Action: server enters "Formats and Version Negotiated" state.
Event: timeout after waiting for Client Audio Formats and Version PDU.
Action: server terminates the protocol.
Event: client version <6 or server version <6.
Action: server enters "Sending Training PDU" state.
Event: client version >=6, and server version >=6.
Action: wait for Quality Mode PDU from client.
Event: server receives Quality Mode PDU or timeout.
Action: server enters "Sending Training PDU" state.
Event: there is a valid UDP port in Client Audio Formats and Version PDU, and server is attempting to use UDP.
Action: server enters "Sending Training PDU through UDP" state.
Event: there is no valid UDP port in Client Audio Formats and Version PDU, or server is not attempting to use UDP.
Action: server enters "Sending Training PDU through Virtual Channel" state.
Event: server sends Training PDU through UDP.
Action: server enters "Waiting for Training Confirm PDU" state.
Event: server receives Training Confirm PDU from client.
Action: server sends Crypt Key PDU.
Event: timeout after waiting for Training Confirm PDU using UDP.
Action: server enters "Sending Training PDU through Virtual Channel" state.
Event: server sends Crypt Key PDU and succeeds.
Action: server enters "Ready to Send Data through UDP" state.
Event: failure when sending Crypt Key PDU.
Action: server enters "Sending Training PDU through Virtual Channel" state.
Event: data ready.
Action: server sends Wave Encrypt PDU, or UDP Wave PDU and UDP Wave Last PDU.
Event: server receives Wave Confirm PDU from client.
Action: server enters "Ready to Send Data through UDP" state.
Event: failure when sending data.
Action: server sends Close PDU and terminates the protocol.
Event: server sends Training PDU through virtual channel.
Action: server enters "Waiting for Training Confirm PDU" state.
Event: server receives Training Confirm PDU from client.
Action: server enters "Ready to Send Data through Virtual Channel" state.
Event: timeout after waiting for Training Confirm PDU through virtual channel.
Action: server terminates the protocol.
Event: data ready.
Action: server sends WaveInfo PDU, Wave PDU, or Wave2 PDU.
Event: server receives Wave Confirm PDU from client.
Action: server enters "Ready to Send Data through Virtual Channel" state.
Event: failure when sending data.
Action: server sends Close PDU and server terminates the protocol.
Unless otherwise specified, malformed, unrecognized, and out-of-sequence packets MUST be ignored by the server and the client.