title: Reading from a network stream: packet fragmentation
body: <p>I got a server that is managing two clients through <code>NetworkStream.Read</code>.</p>
  
  <p>Application protocol is:</p>
  
  <p>ClientMessage [128 Bytes] → Response from Server [128 Bytes]</p>
  
  <p>Now at server-side: Is it possible, that <code>MyTcpClient.GetStream().Read()</code> returns only &lt; 128 Bytes, although all messages from client-side are exactly 128 bytes long?</p>
  
  <p>I guess that such a client message is short enough to fit into one packet on the tcp/ip layer - but could there be some kind of fragmentation or random although?</p>
  
  <p>Is <code>NetworkStream.DataAvailable</code> the right attribute to defend against this?</p>
  
  <p>After running smoothly for hours, i sometimes get strange errors and connection losses, that point to something like that.</p>
  
  <p>Thanks in advance.</p>