public void StartDataTransmission() { Task.Run(startDataTransmission); SendCommand(ByteCommandEnum.SetDataPushOn); void startDataTransmission() { DataTransmissionLog = new StringBuilder(); IPEndPoint ep = DataTransmissionEndPoint; while (IsTransmitting) { byte[] receivedBytes = DataTransmissionClient.Receive(ref ep); DataTransmissionLog.Append(); } } }
public bool Shutdown() { try { ControlClient.Close(); DataTransmissionClient.Close(); StorageDataReadingClient.Close(); // TODO: Add task cancellation return(true); } catch (Exception) { return(false); //throw; } }