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
33
votes
4 answers

Using FFMPEG to stream continuously videos files to a RTMP server

ffmpeg handles RTMP streaming as input or output, and it's working well. I want to stream some videos (a dynamic playlist managed by a python script) to a RTMP server, and i'm currently doing something quite simple: streaming my videos one by one…
kketch
  • 673
  • 1
  • 7
  • 10
31
votes
6 answers

How to open a Windows named pipe from Java?

On our Linux system we use named pipes for interprocess communication (a producer and a consumer). In order to test the consumer (Java) code, I would like to implement (in Java) a dummy producer which writes to a named pipe which is connected to the…
Philipp
  • 4,659
  • 9
  • 48
  • 69
29
votes
4 answers

WCF vs. .Net Remoting

according to this article, WCF with named pipes is the best choice for IPC, and it is around 25 % faster than .Net Remoting. I have the following code that compares WCF with named pipes with .Net Remoting: [ServiceContract] internal interface…
Sergey
  • 581
  • 1
  • 5
  • 12
27
votes
1 answer

Create Named Pipe C++ Windows

I am trying to create a simple comunication between 2 processes in C++ ( Windows ) like FIFO in linux. This is my server: int main() { HANDLE pipe = CreateFile(TEXT("\\\\.\\pipe\\Pipe"), GENERIC_READ, 0, NULL, OPEN_EXISTING, …
user3052078
  • 487
  • 1
  • 8
  • 20
26
votes
7 answers

Breaking ReadFile() blocking - Named Pipe (Windows API)

To simplify, this is a situation where a NamedPipe SERVER is waiting for a NamedPipe CLIENT to write to the pipe (using WriteFile()) The Windows API that is blocking is ReadFile() The Server has created the synchronous pipe (no overlapped I/O) with…
Mike Trader
  • 8,564
  • 13
  • 55
  • 66
24
votes
5 answers

A standard Unix command-line tool for piping to a socket

I have some applications, and standard Unix tools sending their output to named-pipes in Solaris, however named pipes can only be read from the local storage (on Solaris), so I can't access them from over the network or place the pipes on an NFS…
Robert Gould
  • 68,773
  • 61
  • 187
  • 272
24
votes
3 answers

c# Full Duplex Asynchronous Named Pipes .NET

I am trying to achieve a full-duplex client-server communication scheme, on 2 different machines (only), where each end-point (client or server) can send stuff at any time, asynchronously (non-blocking pipe), and the other end will pick it up and…
eric frazer
  • 1,492
  • 1
  • 12
  • 19
23
votes
4 answers

System.IO.Exception: Pipe is broken

I have two .NET applications that talk to each other over a named pipe. Everything is great the first time through, but after the first message is sent, and the server is going to listen again, the WaitForConnection() method throws a…
user90784
23
votes
1 answer

How do I perform a non-blocking fopen on a named pipe (mkfifo)?

If I have a program which creates and attempts to open a named pipe using mkfifo, how can I open a pipe for reading or writing without blocking? Specifically, I'm writing a C program which can be run with or without a gui (written in Java). In the C…
Zxaos
  • 7,791
  • 12
  • 47
  • 61
22
votes
1 answer

Named pipes usage. Multiple clients, one server, multiple parallel requests

I'm trying to implement a named pipes server in .NET. The client will be C++. The nature of the data sent is not relevant to the question. My first naive implementation looks something like: using (NamedPipeServerStream stream = new…
Adrian Zanescu
  • 7,907
  • 6
  • 35
  • 53
22
votes
5 answers

Shared memory between 2 processes (applications)

I can't find any useful answer for this question, although it has been asked in a different way several times. I want to share a memory between two processes (two different applications), so that one of them can write to that memory and the other…
Tea Bee
  • 401
  • 2
  • 8
  • 18
22
votes
2 answers

Sockets vs named pipes for local IPC on Windows?

Are there any reasons for favoring named pipes over sockets for local IPC (both using win-api), effectiveness-wize, resource-wize or otherwise, since both behave very much alike (and likely to be abstracted by a similiar interface anyway), in an…
sold
  • 2,041
  • 5
  • 25
  • 32
21
votes
1 answer

Sample on NamedPipeServerStream vs NamedPipeServerClient having PipeDirection.InOut needed

I'm looking for a good sample where NamedPipeServerStream and NamedPipeServerClient can send messages to each other (when PipeDirection = PipeDirection.InOut for both). For now I found only this msdn article. But it describes only server. Does…
Nat
  • 467
  • 1
  • 6
  • 12
21
votes
4 answers

What are the differences between pipes in Windows and Linux?

What are the differences between pipes in Windows and Linux?
Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
21
votes
2 answers

Is there a way to improve performance of linux pipes?

I'm trying to pipe extremely high speed data from one application to another using 64-bit CentOS6. I have done the following benchmarks using dd to discover that the pipes are holding me back and not the algorithm in my program. My goal is to…
KyleL
  • 1,379
  • 2
  • 13
  • 35