Beispiel #1
0
        public static void Main()
        {
            Comm    comm = new Comm("http://localhost:", 8080);
            Message msg  = new Message(Message.MessageType.connect);

            msg.fromAddress = "http://localhost:8080/IService";
            msg.toAddress   = "http://localhost:8080/IService";
            comm.postMessage(msg);
            Message msg1 = comm.getMessage();

            Console.Write("\n received message type is:" + msg1.type);
        }
        public Repository()
        {
            comm = new Comm("http://localhost", 9070);
            Message _msg = new Message(Message.MessageType.BuildRequest);

            _msg.toAddress   = "http://localhost:9080/IService";
            _msg.fromAddress = "http://localhost:9070/IService";
            string[] buildRequests = Directory.GetFiles(Path.Combine(Path.GetFullPath(Storagepath), "BuildRequests"), "*BuildRequest*.xml");
            foreach (string bRequest in buildRequests)
            {
                Message m1 = _msg.Clone();
                m1.body     = File.ReadAllText(bRequest);
                m1.fileName = Path.GetFileName(bRequest);
                comm.postMessage(m1);
            }
            rcvThread = new Thread(rcvThreadProc);
            rcvThread.Start();
        }