Using named pipes from managed code

  • Thread starter Thread starter Roy Chastain
  • Start date Start date
R

Roy Chastain

I have been looking for some named pipes solutions and I have found a couple that were very extensive and very complicated ones.

I tried a more simplistic approach.

I imported enough API calls to create the pipe etc and then took the returned pipe handle and created a FileStream using that
handle. I was then able to perform asynchronous IO on the pipe via the BeginRead/BeginWrite methods in FileStream.

I have not done extensive testing on this yet, but it appears to work. Have I missed something that would make me not want to do
things this way?

Thanks
 
Nothing particularly wrong with using named pipes. They are reliable and
some apps have been using them for years, including SQL Server.
The only issues I've heard of come when you want to use named pipes across a
WAN, I believe named pipes have some scaling issues, although I'm no expert
on file-system-based networking protocols.

Here's an article that may be helpful
http://www.winnetmag.com/Windows/Articles/ArticleID/4907/pg/2/2.html

--- Nick


Roy Chastain said:
I have been looking for some named pipes solutions and I have found a
couple that were very extensive and very complicated ones.
I tried a more simplistic approach.

I imported enough API calls to create the pipe etc and then took the
returned pipe handle and created a FileStream using that
handle. I was then able to perform asynchronous IO on the pipe via the
BeginRead/BeginWrite methods in FileStream.
I have not done extensive testing on this yet, but it appears to work.
Have I missed something that would make me not want to do
 
Back
Top