title: Really long message cut off on socket receive
body: <p>I just noticed that my socket client wasn't receiving the same data the server was sending back to it. The text gets cut off after 8192 characters.</p>
  
  <p>Is there some limit I am not aware of? How do I get past this?</p>
  
  <p>The client uses this code:</p>
  
  <pre><code>//Send and Receive
  public string sendAndReceiveMSG(string msg)
  {
      try
      {
          NetworkStream serverStream = clientSocket.GetStream();
          string sendresponse = sendMSG(msg, serverStream);
          if (sendresponse == "ConnectionCrash")
          {
              return sendresponse;
          }
          else if (sendresponse == "OK")
          {
              string receiveresponse = receiveMSG(serverStream);
              return receiveresponse;
          }
          return "UnknownErrorInternal";
      }
      catch (Exception ex)
      {
          return "UnknownErrorInternal";
      }
  }
  
  //Send msg
  private string sendMSG(string msg, NetworkStream serverStream)
  {
      try
      {
          byte[] outStream = System.Text.Encoding.ASCII.GetBytes(msg);
          serverStream.Write(outStream, 0, outStream.Length);
          serverStream.Flush();
          return "OK";
      }
      catch (Exception ex)
      {
          endSock();
          return "ConnectionCrash";
      }
  }
  
  //Receive msg
  private string receiveMSG(NetworkStream serverStream)
  {
      try
      {
          byte[] inStream = new byte[10025];
  
          int buffSize = clientSocket.ReceiveBufferSize;
          dynamic bytesRead = serverStream.Read(inStream, 0, buffSize);
  
          string returndata = System.Text.Encoding.ASCII.GetString(inStream, 0, bytesRead);
          return returndata;
      }
      catch (Exception ex)
      {
          endSock();
          return "ConnectionCrash";
      }
  }
  </code></pre>
  
  <p>The client then gets a response from the server like so;</p>
  
  <pre><code>string recv = client.sendAndReceiveMSG("someRequest");
  </code></pre>