private void Process() { while (true) { string newCommand = ""; if (controller.Listen(out newCommand)) { Console.WriteLine(newCommand); string sendBuffer = "\r\n:" + machine.HandleCommand(newCommand) + "\r\n:"; controller.SendResponse(sendBuffer); Console.WriteLine(sendBuffer); } Thread.Sleep(machine.GetResponseDelay()); } }