Questions tagged [named-pipes]

A named pipe is an inter-process communication mechanism, which exists both on Unix and Unix-like systems (where it is also known as a FIFO and is file-like), and on Microsoft Windows (where it is an in-memory kernel object). The semantics and APIs differ substantially between the platforms.

Unix

On Unix and Unix-like systems a named pipe (also known as a FIFO for its behavior) is an extension to the traditional pipe concept, and is one of the methods of inter-process communication.

A traditional pipe is "unnamed" because it exists anonymously and persists only for as long as the process is running. A named pipe is system-persistent and exists beyond the life of the process and must be deleted once it is no longer being used. Processes generally attach to the named pipe (usually appearing as a file) to perform inter-process communication (IPC).

Windows

On Windows operating systems a named pipe is a named kernel object which provides duplex data transfers between two processes, a pipe server and a pipe client. Multiple completely independent instances of a particular named pipe object can be created, each connecting the pipe server to exactly one client. A pipe instance persists only as long as its server and client processes keep a handle referencing it.

Communication between the server and client via a pipe instance may be either stream-oriented or message-oriented.

1850 questions
164
votes
2 answers

unix domain socket VS named pipes?

After looking at a unix named socket and i thought they were named pipes. I looked at name pipes and didnt see much of a difference. I saw they were initialized differently but thats the only thing i notice. Both use the C write/read function and…
user34537
164
votes
12 answers

IPC performance: Named Pipe vs Socket

Everyone seems to say named pipes are faster than sockets IPC. How much faster are they? I would prefer to use sockets because they can do two-way communication and are very flexible but will choose speed over flexibility if it is by considerable…
user19745
  • 3,499
  • 8
  • 25
  • 21
158
votes
10 answers

What are named pipes?

What are they and how do they work? Context happens to be SQL Server
Brian G
  • 53,704
  • 58
  • 125
  • 140
155
votes
4 answers

Example of Named Pipes

How do I write a simple--bare minimum needed for it to work--test application that illustrates how to use IPC/Named Pipes? For example, how would one write a console application where Program 1 says "Hello World" to Program 2 and Program 2 receives…
Jordan Trainor
  • 2,410
  • 5
  • 21
  • 23
96
votes
4 answers

WCF named pipe minimal example

I'm looking for minimal example of WCF Named Pipes (I expect two minimal applications, server and client, which can communicate via a named pipe.) Microsoft has the briliant article Getting Started Tutorial that describes WCF via HTTP, and I'm…
Oleg Vazhnev
  • 23,239
  • 54
  • 171
  • 305
71
votes
5 answers

Example of using named pipes in Linux shell (Bash)

Can someone post a simple example of using named pipes in Bash on Linux?
Drew LeSueur
  • 19,185
  • 29
  • 89
  • 106
67
votes
1 answer

Why does a read-only open of a named pipe block?

I've noticed a couple of oddities when dealing with named pipes (FIFOs) under various flavors of UNIX (Linux, FreeBSD and MacOS X) using Python. The first, and perhaps most annoying is that attempts to open an empty/idle FIFO read-only will block…
Jim Dennis
  • 17,054
  • 13
  • 68
  • 116
57
votes
2 answers

PipeTransmissionMode.Message: How do .NET named pipes distinguish between messages?

Can somebody clarify the meaning of PipeTransmissionMode.Message in .NET? How does .NET distinguish one message passed through the pipe from another? Can I serialize an object using a BinaryFormatter and then pass it through the pipe as a message?…
Art Spasky
  • 1,635
  • 2
  • 17
  • 30
47
votes
2 answers

Python and Windows Named Pipes

What is the proper way of communicating with named pipes on Windows from Python? I've googled it, and can't find any packages that wrap this communication. There are: some descriptions of how to do it with pywin32 (I could not find how to connect…
Ray P.
  • 875
  • 1
  • 9
  • 24
45
votes
7 answers

What is a good way to shutdown Threads blocked on NamedPipeServer#WaitForConnection?

I start my application which spawns a number of Threads, each of which creates a NamedPipeServer (.net 3.5 added managed types for Named Pipe IPC) and waits for clients to connect (Blocks). The code functions as intended. private void…
Gishu
  • 134,492
  • 47
  • 225
  • 308
40
votes
6 answers

How slow are TCP sockets compared to named pipes on Windows for localhost IPC?

I am developing a TCP Proxy to be put in front of a TCP service that should handle between 500 and 1000 active connections from the wild Internet. The proxy is running on the same machine as the service, and is mostly-transparent. The service is…
vz0
  • 32,345
  • 7
  • 44
  • 77
37
votes
3 answers

How to create a named pipe in node.js?

How to create a named pipe in node.js? P.S.: For now I'm creating a named pipe as follows. But I think this is not best way var mkfifoProcess = spawn('mkfifo', [fifoFilePath]); mkfifoProcess.on('exit', function (code) { if (code == 0) { …
wako
  • 785
  • 2
  • 7
  • 9
36
votes
7 answers

Named Pipe Server throws UnauthorizedAccessException when creating a second instance if PipeSecurity is set

I am trying to write a (elevated privilege) service that will talk to a non privileged winforms application. I was able to have two console applications (one elevated one not) talk back and forth no problem but I am having a problem doing a service…
Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431
35
votes
10 answers

SQL Connection Error: System.Data.SqlClient.SqlException (0x80131904)

I am seeing this in several situations and it is intermittent in our web based application connecting to SQL Server 2008 R2 serve back end. Users are coming across a point 2 point connection and seeing this on and off. Thought it was bandwidth…
Sean Borner
  • 351
  • 1
  • 3
  • 3
33
votes
2 answers

Python read named PIPE

I have a named pipe in linux and i want to read it from python. The problem is that the python process 'consumes' one core (100%) continuously. My code is the following: FIFO = '/var/run/mypipe' os.mkfifo(FIFO) with open(FIFO) as fifo: while…
user1005633
  • 625
  • 3
  • 9
  • 23
1
2 3
99 100