I have a project that needs some inter process communication.
I'm looking at using Named Pipes for this purpose.
I mananged to create a Server instance ( class NamedPipeServerStream ),
and a Client instance ( class NamedPipeClientStream),
connect them and exchange messages and binary data by using asynchronous methods -
BeginWaitForConnection , BeginRead , BeginWrite.
I'm trying to connect more then one client to the Pipe Service and I can't do it.
After the first client has connected, I'm getting an exception when try to listen for another connection:
throws a InvalidOperationException with the message "Already in a connected state."
How can I create a server that will allow multiple clients.