Question

I am working on a inter processes communication. I came across named pipe communication.

I already have some basic idea but need to make sure the following points?

  1. Does name pipe can have more than one client at a same time?

  2. Does it supports communication over different process build on different languages.

And please do tell me that what is the difference between named pipe communication and broadcasting for inter process communication ?

Was it helpful?

Solution

No, a single pipe only supports a single client. Much like a web server, it also creates multiple connections to each individual client. A pipe server works the same way.

Yes, bridging the wall between processes is a major use case for named pipes.

Windows supports a different object for broadcasting, a mailslot. It was never ported to .NET, it is pretty useless. Broadcasting is not reliable, it is like yelling in a crowded football stadium without any guarantee that anybody can hear you. If you need broadcasts then you should consider an UDP socket. And of course deal with the consequence of it randomly losing data.

WCF is the usual recommendation if you consider named pipes. It puts a layer on top of them to make them easier to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top