named-pipes

feeding data to C API expecting a filename

I'm writing a straightforward C program on Linux and wish to use an existing library's API which expects data from a file. I must feed it a file name as a const char*. But i have data, just like content of a file, already sitting in a buffer allocated on the heap. There is plenty of RAM and we want high performance. Wanting to avoid...

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 StartNamedPipeServer() { using (NamedPipeServerStream pipeStream = new Name...

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 consumer. Now the test should also work in the Windows development environment. Thus I ...

How to fix garbled text with using WriteFile on a pipe?

I have a Win32 application that I'm making, and it sends a string from one process to another via a named pipe. However, the process that calls ReadFile on the pipe gets the string with some garbled data in it. It returns the number of bytes written correctly, but the last 8 characters or so of the string are garbled. Here is the code f...

How do you resolve issues with named pipes?

I have a binary program* which takes the contents of a supplied file, processes it, and prints the result on the screen through stdout. For an automation script, I would like to use a named pipe to send data to this program and process the output myself. After trying to get the script to work I realized that there is an issue with the bi...

Windows Named-Pipe ACL under IIS

I am trying to connect a CGI process to my windows service with a named pipe. My code runs fine using another server on my development machine, but on IIS there are security issues when I call CreateFile() in the CGI process. The Windows service is the Named Pipe Server and so the CGI process is trying to connect to that named pipe as a...

Reading/writing from named pipes under mono/Linux

I would like to read/write from a named pipe/FIFo queue under Linux. I have tried the standard classes StreamWriter and other classes from System.IO, but it fails because it is using seek. Has anyone ever written/read from a named pipe using Mono?. I am managing to read and write - but not the same time... ...

Win32 named pipes and remote clients

Can I access a named pipe on computer A from computer B given computer A's IP address? If so, what do I need to do to make this happen? ...

Showing data in a GUI where the data comes from an outside source

I'm kind of lost on how to approach this problem, I'd like to write a GUI ideally using Tkinter with python, but I initially started with Qt and found that the problem extends either with all GUI frameworks or my limited understanding. The data in this case is coming from a named pipe, and I'd like to display whatever comes through the ...

How do I transparently compress/decompress a file as a program writes to/reads from it?

I have a program that reads and writes very large text files. However, because of the format of these files (they are ASCII representations of what should have been binary data), these files are actually very easily compressed. For example, some of these files are over 10GB in size, but gzip achieves 95% compression. I can't modify th...

NetNamedPipe: varying response time when communication is idling

I have two WCF apps communicating one-way over named pipes. All is nice, except for one thing: Normally, the request/response cycle takes zero (marginal) time. However, if there was a time span of, say, half a minute without any communication, the request/response increases up to ~300-500ms. I looked around the net and I got the idea of...

Named pipes versus TCP for JDBC-MySQL in Windows

I've been having numerous connection problems between my Java (JPA+Hibernate+CommonsDBCP) app connecting to MySQL. I've done the research, tweaked all the settings with validation queries, timeouts, tests before X, etc. This path led me to another StackOverflow question comparing DBCP and C3PO. From the responses, I've decided to defini...

MySQL named pipes on Windows--faster best practice, or bad idea?

Lately I've been favoring using named pipes (option --enable-named-pipes) in MySQL running on windows, and connect via the .NET connector driver. It's often recommended for security purposes, but one thing it allows me to do is connect with "." as the connection string and develop on my PC and deploy to the server without having to chan...

Which Interprocess Communication methods work on a Terminal Server?

In a terminal server session, some standard IPC technologies might not work like in a single user environment, because the required resources are not virtualized. For example, TCP/IP ports are not virtualized, so applications in different sessions which try to listen on the same port will cause a port conflict. Which IPC technology wil...

Any video tutorials for Named Pipes?

Hello, Can someone point me to a video that teaches how to use named pipes in C# (.Net framework 3.5)? Thank you ...

Print fifo content and exit

I need to print the content of a fifo (named pipe) to standard output. I could use the command: cat fifo The problem is that cat doesn't return. It stays running, waiting for more content coming from the fifo. But I know there wont be any more content coming for a while so I just want to print what's available. Is there a command tha...

WCF InProcFactory error

I'm using IDesign's ServiceModelEx assembly to provide additional functionality over and above what's available in standard WCF. In particular I'm making use of InProcFactory to host some WCF services within my process using Named Pipes. However, my process also declares a TCP endpoint in its configuration file, which I host and open wh...

Returning data to the user (Good API Design)

So right now I've developed an application that I'm trying to write an API for. The application will ideally return strings back to the user. The API can not "return" the data in the normal programmatically sense because there may be an unknown amount of strings being sent from the application. On Unix systems is it a bad idea to pass th...

unistd.h read() is reading more data then being written

I'm reading/writing data off of a named pipe. On the writing side it says that it's writing a constant 110 bytes. On the Reading side for the majority of time it says that it's reading 110 bytes which is correct, but other times it says its reading 220 bytes or 330 bytes. Which is right in the fact that when I print it out it's printing ...

My simple namedpipe sample works fine on my vista/win2k8 server box but fails on win2k3

Hi i am using the new named pipes feature of .net35 it is very easy to use on same machine (win2k8) but with the exact same code, i get the following error immediately i call EndRead on the pipestream in the async callback handler on the client under win2k3 server: "The operation was canceled." any help will be appreciated. thanks. ...