I’m looking for a good sample where NamedPipeServerStream and NamedPipeServerClient can send messages to each other (when PipeDirection = PipeDirection.InOut for both). For now I found only this msdn article. But it describes only server. Does anybody know how client connecting to this server should look like?
I’m looking for a good sample where NamedPipeServerStream and NamedPipeServerClient can send messages to
Share
What happens is the server sits waiting for a connection, when it has one it sends a string “Waiting” as a simple handshake, the client then reads this and tests it then sends back a string of “Test Message” (in my app it’s actually the command line args).
Remember that the
WaitForConnectionis blocking so you probably want to run that on a separate thread.Same Class, Server Method