Beispiel #1
0
 // Function that dequeues the message from the receiver queue and calls the message handler function
 void processMessage()
 {
     while (true)
     {
         CommMessage msg = commObj.getMessage();
         messageHandler(msg);
     }
 }
Beispiel #2
0
        // Test stub for Comm
        static void Main(string[] args)
        {
            Comm        comm    = new Comm("http://localhost", 8084);
            CommMessage csndMsg = new CommMessage(CommMessage.MessageType.request);

            csndMsg.command = "show";
            csndMsg.author  = "Sachin_test_Comm";
            csndMsg.to      = "http://localhost:8084/IPluggableComm";
            csndMsg.from    = "http://localhost:8084/IPluggableComm";

            comm.postMessage(csndMsg);

            CommMessage crcvMsg = comm.getMessage();

            crcvMsg.show();
            crcvMsg = comm.getMessage();
            crcvMsg.show();
        }