title: Serializing and deserializing multiple objects over sockets in c#.net
body: <p>I'm getting into socket programming on C#.net for the project I am writing. </p>
  
  <p>The project will be a multi-client system of which the client services monitor system resources and report back to a central server(s).</p>
  
  <p>I was looking into Remoting, WCF etc. to determine which would be best for me. I settled with socket programming because of a number of requirements:</p>
  
  <ul>
  <li>Sockets are faster than the rest with little overhead</li>
  <li>I can support more connections per resources on the servers</li>
  <li>Sockets <strong>can</strong>, with albeit modifications, allow me to interact with UNIX based systems also.</li>
  <li>I can implement encryption on the link myself in code without having to rely on an SSL cert.</li>
  </ul>
  
  <p>I may be wrong in my thinking here? If I am please do tell. Some suggest WCF as it is "wasy to use" and does everything I want but I believe it is that much slower with overheads. </p>
  
  <p>My main issue is, that while the client machine will not keep a connection open, there could be thousands, or tens of thousands, of client machines and I would have to assume that the machine will be hammered with connections. Considering minimum times between connections, per client, may be as small as 1 min.</p>
  
  <p>Now to my problem at hand: <strong>How to send multiple objects over the link and more importantly how to determine what they are on the other side?</strong></p>
  
  <p>I'm assuming this is possible over one connection as I have read a number of articles saying so, albeit they describe the methods differently and so are the examples.</p>
  
  <p>The issue is I can't find any example that actually does this. No example shows how to send multiple objects and then how to determine what they are on the other side.</p>
  
  <p>Can anyone help me here or point me to examples. I'm quite able to figure stuff out once I have a base to work from.</p>