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
10
votes
3 answers

There was no endpoint listening at net.pipe://localhost/

I have two WCF services hosted in a single Windows Service on a Windows Server 2003 machine. If the Windows service needs to access either of the WCF services (like when a timed event occurs), it uses one of the five named pipe endpoints exposed…
virsum
  • 243
  • 1
  • 5
  • 16
10
votes
2 answers

How to list pipes used by a process with a bash command

Is there a way to list pipes used by a running linux process (e.g. given its pid or process name) and to determine their used capacity? Something like: lspipes -l -p pid resulting in something like: [rw] descriptor size name where rw is the…
a1an
  • 3,526
  • 5
  • 37
  • 57
10
votes
1 answer

How do I call a WCF method from c++ using Named pipes?

UPDATE: Looking through the protocol here, I can't figure out what goes into the Unsized Envelope Record. I can't find any examples online. ORIGINAL: I have the following WCF service static void Main(string[] args) { var inst = new…
scott
  • 2,991
  • 5
  • 36
  • 47
10
votes
3 answers

WCF Named Pipe Security and Multiple User Sessions?

I have setup a WPF application that is single instance using a Mutex, this allows for the application to run within each user account if you are using user switching. The application sets up a WCF named pipe so that I can communicate to the single…
Luke
  • 6,195
  • 11
  • 57
  • 85
9
votes
1 answer

Stream video from ffmpeg and capture with OpenCV

I have a video stream coming in on rtp to ffmpeg and I want to pipe this to my OpenCV tools for live streaming processing. The rtp linkage is working because I am able to send the incoming data to a file and play it (or play if via ffplay). My…
chembrad
  • 887
  • 3
  • 19
  • 33
9
votes
2 answers

Named pipes server read timeout

When using C# NamedPipeServerStream, in case a client doesn't send any message-end-pattern (like \r\n when server reads with ReadLine()) NamedPipeServerStream Read methods will wait forever and no Abort() or Interupt() methods will work on that…
MajesticRa
  • 13,770
  • 12
  • 63
  • 77
9
votes
2 answers

WCF Multiple Apps using NetNamedPipe

I am trying to run multiple WCF Service hosting apps on the same Machine. I want to run multiple Applications - not multiple services in one application. var host = new ServiceHost(typeof(MyClass1), new Uri[] { new Uri("net.pipe://localhost")…
Jaster
  • 8,255
  • 3
  • 34
  • 60
9
votes
5 answers

"Attempted to perform an unauthorized operation" when calling NamedPipeServerStream.SetAccessControl

I'm trying to use PipeSecurity to secure a NamedPipeServerStream. When I call this.pipeServer.SetAccessControl(pipeSecurity) in the snippet below I get the following exception: Attempted to perform an unauthorized operation. at…
9
votes
2 answers

Read from a 'named pipe' / fifo with Node.js

I have this: const p = path.resolve(projectRoot + '/NAMEDPIPEIN'); const fd = fs.openSync(p, 'r+'); fs.createReadStream(null, {fd}).on('data', function (d) { if (String(d).trim() === '[stdin end]') { return process.nextTick(cb); …
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
9
votes
1 answer

Inter process communication between Electron app and Win32 native desktop app

I am trying to implement inter process communication between a desktop native app and an electron app on Windows for assignement(Operating systems). I am new to this area and not able to find relevant links. The options I have considered are: 1.…
9
votes
3 answers

WCF - Fastest interprocess communication

A have a web-accessible (via basicHttpBinding) WCF service which I also want to access from other .NET services on the same machine with as higher performance as possible. I understand that the netNamedPipeBinding is ideal for this, but wonder what…
Barguast
  • 5,926
  • 9
  • 43
  • 73
9
votes
3 answers

When messages get bigger, IpcChannel Remoting gets slower

I'm evaluating various interprocess communication methods for a couple of .NET 2.0 processes residing on the same machine. Naturally, .Net Remoting is a candidate, and theoretically the fastest configuration should be IpcChannel (named pipes) +…
Yodan Tauber
  • 3,907
  • 2
  • 27
  • 48
9
votes
4 answers

Non-Blocking File IO in Java

I want to write to a named pipe (already created) without blocking on the reader. My reader is another application that may go down. If the reader does go down, I want the writer application to keep writing to that named pipe. Something like a this…
Gautam
  • 91
  • 1
  • 1
  • 2
9
votes
3 answers

Detect when reader closes named pipe (FIFO)

Is there any way for a writer to know that a reader has closed its end of a named pipe (or exited), without writing to it? I need to know this because the initial data I write to the pipe is different; the reader is expecting an initial header…
Jonathon Reinhart
  • 132,704
  • 33
  • 254
  • 328
9
votes
4 answers

Can Sql Server BULK INSERT read from a named pipe/fifo?

Is it possible for BULK INSERT/bcp to read from a named pipe, fifo-style? That is, rather than reading from a real text file, can BULK INSERT/bcp be made to read from a named pipe which is on the write end of another process? For example: create…
Peter Radocchia
  • 10,710
  • 2
  • 34
  • 56