Пример #1
0
 void strThreadProc()//string receive thread
 {
     while (true)
     {
         // get message out of receive queue - will block if queue is empty,
         rcvdMsg = recvr.GetMessage();                  //get message
         Console.WriteLine("\nthis is for requirement 10, message received by WCF and the message is :\n" + rcvdMsg);
         CommandData cmdData = parsingMessage(rcvdMsg); //parsing message
         procMsg(cmdData);                              //
     }
 }
Пример #2
0
        void ThreadProc()//receiving thread
        {
            while (true)
            {
                rcvdMsg = strrcvr.GetMessage();
                // call window functions on UI thread

                parseMesaage(rcvdMsg);
                this.Dispatcher.BeginInvoke(
                    System.Windows.Threading.DispatcherPriority.Normal,
                    OnNewMessage,
                    "\nthis is for requirement 10, message received by WCF and the message is :\n" + rcvdMsg);
            }
        }