How to do a non-waiting write on a named pipe (c#) ?

Posted by Jelly Amma on Stack Overflow See other posts from Stack Overflow or by Jelly Amma
Published on 2010-06-10T15:16:27Z Indexed on 2010/06/10 15:52 UTC
Read the original article Hit count: 118

Hello,

I'm using .net 3.5 named pipes and my server side is :

serverPipeStream = new NamedPipeServerStream("myPipe", PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);

When I write some data with, say, BinaryWriter, the write() call itself doesn't return until the client side has called a read() on its NamedPipeClientStream.

How can I make my write() to the named pipe non-blocking ?

Thanks in advance for any help.

© Stack Overflow or respective owner

Related posts about c#

Related posts about named-pipes