title: Sending data from server
body: <p>I tried to send data to client using this function</p>
  
  <pre><code>protected void SendData(Socket so, string sendData)
  {
      byte[] data = Encoding.ASCII.GetBytes(sendData);
      so.Send(data);
  
      Console.WriteLine("Sending data back to Client\n");
  }
  </code></pre>
  
  <p>I call this function on this function</p>
  
  <pre><code>protected void ProcessData(int x, string data, Socket so)
  {
      if (x &lt; mybuffersize)
      {
          data = data.Trim();
          SendData(so, data);
      }
  }
  </code></pre>
  
  <p>its work well.. and send the data that server received from client.
  but when I changed it to this,</p>
  
  <pre><code>protected void ProcessData(int x, string data, Socket so)
  {
      if (x &lt; mybuffersize)
      {
          data = data.Trim();
          SendData(so, data);
          string sendData = "Testing send string";
          SendData(so, sendData);
      }
  }
  </code></pre>
  
  <p>Client will only receive the data he send to me, but not the string <code>Testing send string</code>.
  Am I doing something wrongly or are there any restriction?</p>