Example #1
0
        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();
                }
            }
        }
Example #2
0
        public bool Shutdown()
        {
            try
            {
                ControlClient.Close();
                DataTransmissionClient.Close();
                StorageDataReadingClient.Close();
                // TODO: Add task cancellation

                return(true);
            }
            catch (Exception)
            {
                return(false);
                //throw;
            }
        }