1.3.1 RPC Over HTTP Transport

Communication from the RDG server to the RDG client is performed by using an RPC out pipe. Communication from the RDG client to the RDG server is performed by using RPC calls.

The RDG client first calls the TsProxyCreateTunnel, TsProxyAuthorizeTunnel, and TsProxyCreateChannel methods in sequential order, as shown in the figure named Message sequence between RDG client and RDG server during connection setup phase, in section 1.3.1.1.1. The RDG client makes each subsequent call in the order specified, only after a response for the previously issued call is received.

After the TsProxyCreateTunnel call successfully completes, the RDG client calls the TsProxySetupReceivePipe and TsProxySendToServer methods. However, because the TsProxySetupReceivePipe call can have multiple responses from the RDG server, the responses can be interspersed with the calls to TsProxySendToServer.

To end the connection, the RDG client calls the TsProxyCloseChannel and TsProxyCloseTunnel methods in sequential order, as shown in the figure named Message sequence between RDG client and RDG server during shutdown phase, in section 1.3.1.1.3. If the RDG client calls TsProxyCloseTunnel before TsProxyCloseChannel, the RDG server closes the channel and then closes the tunnel. If TsProxyCloseChannel is called after TsProxyCloseTunnel, the RDG client receives an RPC exception. For details about the possible errors returned, see the description of the Return Codes (section 2.2.6).