named-pipes

System.IO.Exception: Pipe is broken

I have 2 .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 System.IO.Exception with text of "Pipe is Broken." Why am I getting this exception here? This is my first ...

How to get a thread to continue after write() has written less bytes than requested?

I'm using the following code to write data through a named pipe from one application to another. The thread where the writing is taken place should never be exited. But if r_write() returns less than it should, the thread/program stops for some reason. How can I make the thread continue once write has returned less than it should? ssize...

FIFO (named pipe) messaging obstacles

I plan to use Unix named pipes (mkfifo) for simple multi-process messaging. A message would be just a single line of text. Would you discourage me from that? What obstacles should I expect? I have noticed these limitations: A sender cannot continue until the message is received. A receiver is blocked until there are some data. Nonblo...

simple IPC mechanism for C#/WPF application to implement app CLI.

So I've been reading lots about interprocess communication on .Net. Named pipes, remoting. It all seems great but possibly overkill for what I need to do. I want to add a command line interface to my WPF application, so I need a simple IPC mechanism to send the string from one process to the already running app. What does SO recommend...

WCF Named Pipes within WPF application

How would you run a WCF named pipe service in the background of a WPF Windows application? I can't seem to find any samples of running the WCF server within a WPF application. Any ideas? I am currently using the following code in the Application_Startup. Does this need to run with it's own thread? Using Host As ServiceModel.Serv...

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 instance from another process (i.e. when the second process runs before it terminates due ...

On Windows, who is in the Everyone and Authenticated Users groups?

My application uses a Named Pipe to do IPC. What access control should I place on it, to provide broad local only access? The pipe is created by the .net 2.0 remoting protocol, and it already has an ACL for the 'NETWORK' group to deny all access, so I think only local users can access it. In my remoting configuration file I need to pick...

Shell Scripting - pipes and redirection

I'm using CocoaDialog to present some feedback during execution of a download script. I wish to present an indeterminate progress bar whilst command operation us taking place. This is possible by piping text to CocoaDialog for the duration of the operation. http://cocoadialog.sourceforge.net/documentation.html#progressbar_control I tho...

When to use named pipes in Windows?

In *nix many command line applications that accept file names as arguments accept pipes also. Example: anApplication file.txt Also works with anApplication | anotherApplication arguments And the result of the "anotherApplication" is redirected to "anApplication" as it was a file I learned that the Windows equivalent to this is a "...

Setting named pipe security in a Domain

I have a server that I'm setting up over a named pipe. It works fine for administrators of the domain, but when I test the client on a normal user, it gives the exception "Access to path is denied". So here is what I'm trying to set the permissions to give access to all authenticated users in the domain. What am I doing wrong here? S...

Some WinAPI to check which process created a named pipe?

Is there some WinAPI call which would tell me who (which process) has created the named pipe? Note: Asking this questions, I have a feeling it "smells" somehow, and a proper design will be to communicate the process ID/handle using other means, however getting this information from the pipe itself would be simpler, and therefore if ther...

How to send object through NamedPipe in .NET 3.5?

Hi, Can you tell me what's the best way to send objects through NamedPipes in .net 3.5? Thanks in advance ...

How to make a named pipe not busy after client has disconnected?

I use a named pipe and I want to reuse the same pipe on the server to allow connecting another client once the original client has disconnected. What I do is: server creates a pipe using CreateNamedPipe server writes data using WriteFile, and retries doing so as long as error ERROR_PIPE_LISTENING is returned (which is before any client...

How is a "handshake" generally implemented with regards to Named Pipes

I need to implement a handshake type protocol in to a small Linux program that uses named pipes to communicate with other processes. I've searched for a general implementation pattern for a handshake type protocol when using named pipes but I've not been able to turn anything up... I simply can't believe that there isn't patterns to do ...

IPC performance: Named Pipe vs Socket

Everywhere seems to say named pipes are fast whereas sockets are slow for ipc. How much greater is the speed advantage of named pipes vs local sockets on linux? 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 a by considerable amount. Comments, ...

C++ Using windows named pipes

For some reason both the mast and slave fail, however I could find any good examples on how their meant to work, so im not sure where I went wrong. The master never exits the WaitForSingleObject after ConnectNamedPipe, and the slave throws an exception in the first boost::asio::read call, "Waiting for a process to open the other end of...

NamedPipeServerStream/async reliable disconnect issues

We're using named pipes to communicate between a C# .Net service and a native C++ application. The service creates a message mode pipe, then kicks off a timer. m_pipeServer = new NamedPipeServerStream ("Cyber_Srv_EventPipe", PipeDirection.InOut, ...

Number of Clients that can connect to a Named Pipe

Say a server created a named pipe "myTestPipe". How many clients can connect to "myTestPipe"? From what I have read on the Web, it seems only one client can, but wanted to make sure. If only one, then it's best to use the blocking WaitForConnection() instead of the Asunchronous method BeginWaitForConnection() as the server will wait unt...

WCF named pipes: Across network? Really?

Many people seem to think this it is possible, yet clearly in this document the boundary is stated as inter-process which to my mind means "no network". Another document is completely unambiguous: The named pipe transport has very little reach; it can only connect to services running on the same machine So why are so many posters...

bidirectional named pipe question

I have 2 apps that I want to make communicate via named pipes on .NET 3.5. Its a request/response paradigm, with the data transmitted as XML to make my life easier. There is a listener app, and an app that posts requests to the pipe. I'm trying to use a bidirectional pipe to do this. The problem i have is that the call to StreamReade...