//<Methods> private void CheckForUpdates() { while (true) { if (_communication.IsDataAvailable()) { var data = _communication.Receive(); _ActionHanlder.ExecuteDataActionFor(data); } else { Thread.Sleep(1); } } }
private void CheckTCPUpdates() { while (_isRunning) { if (_communication.IsDataAvailable()) { DataPackage data = _communication.Receive(); Debug.WriteLine($"Package received:{data.Header.ToString()} Payload:{data.Payload.ToString()}"); _actionHandler.ExecuteDataActionFor(data, _communication); } else { Thread.Sleep(1); } } }