title: Simple C# Metro StreamSocket example
body: <p>I'm posting this because I've already wasted one day searching and programming a thing that should really be simple to set up even in Metro.</p>
  
  <p>I'm looking for a C# StreamSocket example that can connect to a socket, read data from the socket (I don't exactly know when data will arrive, so I always want to listen for new data) and write data to it at arbitrary times. This has been an easy task to accomplish in every programming language framework (including .NET), but I can't do this in Metro without getting exceptions (<code>ObjectDisposedExceptions</code> when trying to write while simultaneously waiting for incoming data).</p>
  
  <p>The Metro examples given are too simple since they know exactly when to poll for data. This simple task should really be possible!</p>