title: CPU usage problem
body: <p>I have a network project, there is no timer in it. just a tcpclient that connect to a server and listen to receive any data from network. </p>
  
  <pre><code>         TcpClient _TcpClient = new TcpClient(_IpAddress, _Port);
          _ConnectThread = new Thread(new ThreadStart(ConnectToServer));
          _ConnectThread.IsBackground = true;
          _ConnectThread.Start();
  
  
      private void ConnectToServer()
      {
          try
          {
              NetworkStream _NetworkStream = _TcpClient.GetStream();
              byte[] _RecievedPack = new byte[1024 * 1000];
              string _Message = string.Empty;
              int _BytesRead;
              int _Length;
  
              while (_Flage)
              {
                  _BytesRead = _NetworkStream.Read(_RecievedPack, 0, _RecievedPack.Length);
                  _Length = BitConverter.ToInt32(_RecievedPack, 0);
                  _Message = UTF8Encoding.UTF8.GetString(_RecievedPack, 4, _Length);
  
                  if (_BytesRead != 0)
                  {
                      //call a function to manage the data
  
                      _NetworkStream.Flush();
                  }
              }
          }
          catch (Exception exp)
          {                
              // call a function to alarm that connection is false
          }
      }
  </code></pre>
  
  <p>But after a while the cpu usage of my application goes up(90%, 85%,...).
  even if no data receive.</p>
  
  <p>could anybody give me some tips about cpu usage. I'm totally blank. i don't know i should check which part of the project!</p>