public Status Open() { while (pipeLog.Open() != Client.Status.Success) { Thread.Sleep(100); } collectLogThread = new Thread(new ThreadStart(CollectLog)); collectLogThread.Start(); while (pipeControl.Open() != Client.Status.Success) { Thread.Sleep(100); } byte[] read = new byte[1]; uint count = 1; while (read[0] != 0xAC) { pipeControl.Read(read, ref count); Thread.Sleep(100); } return(Status.Success); }
private void CollectLog() { byte[] read = new byte[1]; uint count = 1; while (pipeLog.Read(read, ref count) == Client.Status.Success) { logQueue.Enqueue(read[0]); } }