title: c# Full Duplex Asynchronous Named Pipes .NET
body: <p>I am trying to achieve a full-duplex client-server communication scheme, on 2 different machines (only), where each end-point (client or server) can send stuff at any time, asynchronously (non-blocking pipe), and the other end will pick it up and read it.</p>
  <p>(Please don’t answer by referring to other technologies besides named pipes; I need an answer using this particular approach.)</p>
  <p>I've read that Named Pipes have to be one-direction only or they lock up, but I'm guessing that's probably wrong. I think pipes are socket-based, and I can't imagine the underlying socket would be one-way only.</p>
  <p>Any answers to this question need to address these issues for it to be really useful:</p>
  <ol>
  <li>The answers need to address asynchronous pipes, I can't use a synchronous solution.</li>
  <li>the answers need to demonstrate or allow for the fact the pipes stay OPEN. I'm tired of reading examples where the pipe is opened, a string is transmitted, then the pipe is immediately closed. I'd like an answer that assumes the pipes stay open and transmit a LOT of junk, at random times, and keep repeating. with no hangs.</li>
  <li>C#-based solution</li>
  </ol>
  <p>I'm sorry to sound demanding and snotty, but after days of scouring the internet I still haven't found a good example, and I don't want to use WCF. If you know the details of this answer and answer it well, this topic will be a real winner for ages to come, I'm sure. I will post the answer myself if I figure it out.</p>
  <p>If you're about to write and say &quot;You need to use two pipes&quot;, please explain <em>why</em>, and how you know this is true, because nothing I've read about this explains why this is the case.</p>
  <p>thanks!</p>