Search code examples
c#named-pipesmemory-mapped-files

Memory Mapped File VS Named Pipe - C#


In this Article: https://blogs.msdn.microsoft.com/salvapatuel/2009/06/08/working-with-memory-mapped-files-in-net-4/

It exclaims that:

The memory mapped file is the most efficient way for multiple processes on a single machine to communicate with each other.

If this statement is valid, then what exactly is the difference between using a MMF for inter-process comms and using a Named Pipe?


Solution

  • Named Pipe is used for short message between 2 or more processess, and in my experience, it's slow.

    If you want to share much data then the use of MMF is correct.