3.1.5 Message Processing Events and Sequencing Rules

State transition diagram

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:

  1. Event: connected from client.

    Action: server sends Server Audio Formats and Version PDU.

  2. Event: server receives Client Audio Formats and Version PDU.

    Action: server enters "Formats and Version Negotiated" state.

  3. Event: timeout after waiting for Client Audio Formats and Version PDU.

    Action: server terminates the protocol.

  4. Event: client version <6 or server version <6.

    Action: server enters "Sending Training PDU" state.

  5. Event: client version >=6, and server version >=6.

    Action: wait for Quality Mode PDU from client.

  6. Event: server receives Quality Mode PDU or timeout.

    Action: server enters "Sending Training PDU" state.

  7. 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.

  8. 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.

  9. Event: server sends Training PDU through UDP.

    Action: server enters "Waiting for Training Confirm PDU" state.

  10. Event: server receives Training Confirm PDU from client.

    Action: server sends Crypt Key PDU.

  11. Event: timeout after waiting for Training Confirm PDU using UDP.

    Action: server enters "Sending Training PDU through Virtual Channel" state.

  12. Event: server sends Crypt Key PDU and succeeds.

    Action: server enters "Ready to Send Data through UDP" state.

  13. Event: failure when sending Crypt Key PDU.

    Action: server enters "Sending Training PDU through Virtual Channel" state.

  14. Event: data ready.

    Action: server sends Wave Encrypt PDU, or UDP Wave PDU and UDP Wave Last PDU.

  15. Event: server receives Wave Confirm PDU from client.

    Action: server enters "Ready to Send Data through UDP" state.

  16. Event: failure when sending data.

    Action: server sends Close PDU and terminates the protocol.

  17. Event: server sends Training PDU through virtual channel.

    Action: server enters "Waiting for Training Confirm PDU" state.

  18. Event: server receives Training Confirm PDU from client.

    Action: server enters "Ready to Send Data through Virtual Channel" state.

  19. Event: timeout after waiting for Training Confirm PDU through virtual channel.

    Action: server terminates the protocol.

  20. Event: data ready.

    Action: server sends WaveInfo PDU, Wave PDU, or Wave2 PDU.

  21. Event: server receives Wave Confirm PDU from client.

    Action: server enters "Ready to Send Data through Virtual Channel" state.

  22. 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.