private void TriggerRDPDisconnectAllByProtocol()
        {
            string helpMessage = "Trigger RDP client to disconnect all connections.";

            byte[] payload = null;
            ushort reqId   = ++requestId;
            SUT_Control_Request_Message requestMessage = new SUT_Control_Request_Message(SUTControl_TestsuiteId.RDP_TESTSUITE, (ushort)RDPSUTControl_CommandId.CLOSE_RDP_CONNECTION,
                                                                                         reqId, helpMessage, payload);
            TCPSUTControlTransport transport     = new TCPSUTControlTransport();
            IPEndPoint             agentEndpoint = new IPEndPoint(IPAddress.Parse(detectInfo.SUTName), detectInfo.AgentListenPort);

            transport.Connect(timeout, agentEndpoint);
            transport.SendSUTControlRequestMessage(requestMessage);
            transport.Disconnect();
        }
        private void TriggerRDPConnectionByProtocol()
        {
            RDP_Connection_Payload payLoad = new RDP_Connection_Payload();

            payLoad.type = RDP_Connect_Payload_Type.PARAMETERS_STRUCT;
            payLoad.configureParameters = GenerateRDPConnectionConfigParameters(LocalIPAddress(), port, false, false);
            byte[] payload = payLoad.Encode();

            ushort reqId       = ++requestId;
            string helpMessage = "Trigger RDP client to start an RDP connection by SUT Remote Control Protocol.";
            SUT_Control_Request_Message requestMessage = new SUT_Control_Request_Message(SUTControl_TestsuiteId.RDP_TESTSUITE, (ushort)RDPSUTControl_CommandId.START_RDP_CONNECTION,
                                                                                         reqId, helpMessage, payload);

            TCPSUTControlTransport transport     = new TCPSUTControlTransport();
            IPEndPoint             agentEndpoint = new IPEndPoint(IPAddress.Parse(detectInfo.SUTName), detectInfo.AgentListenPort);

            transport.Connect(timeout, agentEndpoint);
            transport.SendSUTControlRequestMessage(requestMessage);
            transport.Disconnect();
        }