Simple Example of Using Pipes with C#

So I decided to dig into understanding how Asp.net works under the hood, out of curiosity.  In the articles that I found the authors described the architecture in lower level details.  One of the things that caught my eyes was the use of named Pipes as a means of inter-process communications by the architecture.   So I decided to dig into that portion a little bit deeper.  I discovered that the .Net framework has a namespace for named pipes and it's quite easy to use.

I intend to demonstrate a small example that I cooked up rather quickly by setting up a named pipe server and then connecting a pipe client to it.  Before I do that, I want to say as a disclaimer that I don't know that this example demonstrates the best way to use pipes.  What it does do is show the most straightforward way to use them.  Also, before you use pipes you should consider using something else like WCF instead if you need well defined interfaces, as using pipes is pretty raw.   Being the type of person that I am I like working with the "raw" components.

To read the full post and see the code please visit my new blog at


https://beginningprogrammer.com/programming/simple-example-of-using-pipes-with-c/





Comments

Mike M. said…
psh, get raw with some c sockets :)
Zipwax said…
try writing an example that doesn't open/write/close immediately. a useful example would Ping-Pong several messages back and forth between client & server.

Popular posts from this blog

Why I Hate Regular Expressions

Why a Programmer Must Have Sales Skills