Exemplo n.º 1
0
        private void ProcessQueue()
        {
            try
            {
                while (!processThreadAbort)
                {
                    DebugMessage message = null;

                    lock (queue)
                    {
                        // check if queue has requests or too many have already been sent
                        if (queue.Count <= 0 || sent.Count > MaxSentQueue)
                        {
                            Thread.Sleep(5);
                            continue;
                        }

                        message = queue.Dequeue();
                    }

                    PrepareUnitTest();

                    message.CallBack = MessageCallBack;

                    debugServerEngine.SendCommand(message);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
        }
Exemplo n.º 2
0
		public void SendMessageAndWait(DebugMessage message)
		{
			wait = true;

			message.CallBack = Acknowledge;

			debugServerEngine.SendCommand(message);

			while (wait)
			{
				Thread.Sleep(5);
			}
		}
Exemplo n.º 3
0
 private void toolStripButton4_Click(object sender, EventArgs e)
 {
     toolStripStatusLabel1.Text = "Sending Ping...";
     DebugEngine.SendCommand(new DebugMessage(Codes.Ping, (byte[])null));
 }
Exemplo n.º 4
0
 private void toolStripButton4_Click(object sender, EventArgs e)
 {
     toolStripStatusLabel1.Text = "Sent Ping!";
     DebugEngine.SendCommand(new DebugMessage(DebugCode.Ping, new List <byte>()));
 }