コード例 #1
0
        //----< send message to host >------------------

        public void SendMessage()
        {
            //copy files
            string tReq = CreateTestrequest();

            CopyandSendFiles(TestRequests[tReq]);

            //set serverEndPoint
            CsEndPoint serverEndPoint = new CsEndPoint();

            serverEndPoint.machineAddress = "localhost";
            serverEndPoint.port           = 8090;

            //construct message for task
            CsMessage msg    = new CsMessage();
            string    tRname = Clientname.ToString() + TestRequests.Count().ToString();
            string    lFname = tRname + "_log.txt";

            msg.add("name", tRname);
            msg.add("testLogFile", lFname);
            msg.add("to", CsEndPoint.toString(serverEndPoint));
            msg.add("from", CsEndPoint.toString(endPoint_));
            msg.add("testRequest", tReq);
            msg.add("type", "client");
            msg.add("command", "ShowResult");
            msg.add("path", translater.getSavePath());
            translater.postMessage(msg);
        }