3.2.6.3 Shutdown Phase
Shutdown phase is used to terminate the channel and tunnel (2). Channel closure can either be initiated by the RDG client or the RDG server. The RDG client SHOULD initiate it by closing the channel using method TsProxyCloseChannel. The RDG server initiates it by setting the PFC_LAST_FRAG bit in the pfc_flags field in the final response for the TsProxySetupReceivePipe method. If the client has any pending administrative message requests on the RDG server, the client cancels the same by making a TsProxyMakeTunnelCall call with TSG_TUNNEL_CANCEL_ASYNC_MSG_REQUEST as a parameter. The closing of tunnel is accomplished by using the TsProxyCloseTunnel method.