title: C# TcpClient: Send serialized objects using separators?
body: <p>Based on serialization (mentioned here <a href="https://stackoverflow.com/a/7849374/985798">https://stackoverflow.com/a/7849374/985798</a>) I am trying to reengineer my small tcp application, which was using a string message until now.</p>
  
  <p>But I ran into a small problem and I would like to know what solution you'd recommend me to use:</p>
  
  <p>If I am trying to send more than one message in a very small interval, they will be merged in the "queue" and the client will receive both messages at the same time, which will end up with a single broken object. In the past I solved this problem with a string separator "|end|" and I was able to split it and process it in a foreach loop.</p>
  
  <p>Is that a good approach? How would you solve that problem based on serialized object byte arrays? Would you use a <code>byte[]</code> delimiter or use another solution?</p>