title: how to make peer to peer confirmed communication C#
body: <p>In my company we have an automatic station that run Iperf and other software across a LAN ,
  Now I got the assignment to improve the communication . I'm pretty novice in C# and need some help . 
  what we have now is :
  simple listener for other messages    </p>
  
  <pre><code>public void Connect(int port, string Host)
      {
          if (!Connected)
          {
              Connected = true;
              SetIP(port, Host);
              t1 = new Thread(new ThreadStart(CreateListener));
              t1.Name = "Listener Thread";
              t1.Priority = ThreadPriority.AboveNormal;
              t1.Start();
          }
  
  public void Disconnect()
  {
      if (Connected)
      {
          t1.Abort();
          peerListener.Stop();
          Connected = false;
      }
  
  }
  
      private void CreateListener()
      {
          try
          {
              int iLength = 0;
              Socket tc = null;
              peerListener = new TcpListener(IPAddress.Any, port);
              peerListener.Start();
              while (true)
              {
                  if (!peerListener.Pending())
                  {
                    //Read data
                  }
              }
           }catch { }
       }
  </code></pre>
  
  <p>and a messenger :</p>
  
  <pre><code>    private void CreateClient(object message)
      {
          try
          {
              peerClient = new TcpClient();
              peerClient.Connect(host, port);
  
  
              netStream = peerClient.GetStream();
              StreamWriter sw = new StreamWriter(netStream);
              sw.Write((string)message);
              //sw.Write((string)messa
              sw.Flush();
  
              netStream.Close();
              peerClient.Close();
          }
          catch
          {
          }
      }
  
      internal void Write(string message)
      {
          ThreadPool.QueueUserWorkItem(new WaitCallback(CreateClient), message);
      }
  </code></pre>
  
  <p>what we do Is to send a Simple Text message , and parse via <code>_TextChanged</code> event the screen for the text and <code>DO SOMETHING</code>  </p>
  
  <p>So far so good , what I'm searching is a way to confirm that once a message is being sent , I can confirm that the application in the other side got the message .</p>
  
  <p>It all works with <code>TcpListener</code> so I'm pretty sure there is a way to sample it and get flag or something that will give me what I want </p>
  
  <p>thank's in advance </p>