named-pipes

Is there any framework or library alowing a deweloper push his pipe thru the NAT and recive it on back end as a pipe?

So I have an app on 1 pc creating a pipe, local pipe. I want to take it as a stream (like only last data in it or incoming data from it) and stream its data thru\over NAT (using nat traversal) to other pc somewhere ower NAT (so neather I or He has uniqe IP adress but we use nat traversal server\programm to comunicate) and there recive th...

When are IO completion port packets sent and when not?

I'm currently working on an IPC mechanism based on named pipes using a IO completion port. Unfortunately I have some troubles with the msdn documentation because it's quite unclear to me in which cases calls to ReadFile/WriteFile result in a completion packet. The case when FALSE is returned with ERROR_IO_PENDING is clear, but what abo...

How to read from Named Pipe latest data for a while and save that data to disc using C#?

So I have some server broadcasting live data onto Named Pipe - \\.\pipe\TestChannel (from VLC for example). I want to read it from now some N seconds and save that readen data to some.file. How to do such thing using C# .Net3.5? (and BTW I wonder about if it is easier to do it from .net4) Could you please provide some simple code exampl...

SqlConnection error Named Pipes Provider

A little background: I have a Windows .NET application that is in use by approximately 40 field employees across North America. This program allows the users to enter data while in the field (away form internet access) and then synchronizes to our Sql Server 2005 database at night. A couple days ago, two of my users reported getting t...

Named pipe not closed when closing ServiceHost

I have a WCF service which uses the named pipe binding. In one part of my code I want to restart this service, so I simply run serviceHost.Close(); serviceHost = new ServiceHost(singletonInstance, uri); serviceHost.Open(); For some reason, the Open call sometimes gives an exception: Cannot listen on pipe name 'net.pipe://localho...

Using named pipes asynchronously with StreamWriter

I am trying to send a string over a named pipe using StreamWriter, but StreamWriter class only offers synchronous operations. I can use BeginWrite method of the NamedPipeServerStream class, but I wonder why there are no writer classes that would allow asynchronous operations. Am I missing something obvious? ...

How to flush a pipe using bash

I have a script that writes to a named pipe and another that reads from the pipe. Occasionally, when starting the script I have noticed that the contents of the pipe exist from a previous run of the script. Is there a way to flush out the pipe at the beginning of the script? ...

Using WCF's net.pipe in a website with impersonate=true

Hi all. I'm trying to use WCF named pipes in a web site, and it's failing with errors: There was no endpoint listening at net.pipe://localhost/mypipename that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. and the InnerException: The pipe name co...

Named pipes - Problem with write() and read()

Hi, I am doing programming in C++, under LINUX. I have two independent processes. I should provide communication using named pipe. Reader: -creates FIFO using mkfifo - status = mkfifo(myFIFO, 0666) -opens the pipe using open - fifo = open (myFIFO,O_RDONLY) -reads from the pipe - num = read(fifo, temp, sizeof(temp)) Writer: -opens pi...

Sending structured data over named pipe (Linux)

Hi, i am using a named pipe for IPC on a Debian system. I will be sending some data as a set of strings from a bash script to a background running process written in C code. The data i want to send is four strings eg accountid, firstname,surname, description. Currently i am sending the data as a char array separated by spaces from my ba...

Named pipes: Many clients. How to be prudent with thread creation? Thread Pool?

Situation: I'm am using named pipes on Windows for IPC, using C++. The server creates a named pipe instance via CreateNamedPipe, and waits for clients to connect via ConnectNamedPipe. Everytime a client calls CreateFile to access the named pipe, the server creates a thread using CreateThread to service that client. After that, the ser...

read not blocking on named pipe

Hi, i have the following bit of C code which reads from a pipe and then should block but it never blocks int pipe_fd; int res; int open_mode = O_RDONLY; char buf[100]; int bytes_read = 0; memset (buf, '\0', sizeof(buf)); pipe_fd = open(FIFO_NAME, open_mode); if (access(FIFO_NAME, F_OK) == -1) { res = mkfifo(FIFO_NAME, 0777); i...

Using name pipes from php

Hi, just a general question are there any issues with using named pipes from a php script, currently i'm calling a bash script from php to write to a named pipe. This would be on Debian Linux to communicate from a php script to some background running C program ...

Named Pipe Server throws UnauthorizedAccessException when creating a seccond 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 and a winforms app. The first instance of the pipe works perfectly. However after my clie...

Is there any way to sniff named pipe traffic in Windows?

Hi guys, Is there any tool that can monitor/capture/sniff named pipe traffic? Even when max instance = 1? ...

Permission problem with apache

started new thread to avoid confusion ...

How to add security attributes for non admin rights account in creatnamedpipe method of win API

I am creating a named pipe in windows service running on local syastem account with security attribute as Intptr.Zero in CreateNamedPipe() method of Windows API. The problem is that this named pipe is not accesible to the user account running the client application and calling CreateFile() method. Now I have googled a lot and found ou...

Unit testing named pipes

What is the recommended way to unit test an object that publishes via NamedPipeServerStreams? My thought was to use a NamedPipeClientStream in the unit test but the test just ends up hanging; I suspect this is due to both of them being in the same process. ...

Windows NAmed Pipes alternative in Linux

Hi, We are porting existing windows code to Linux. We are using ACE as abstraction layer. We are using windows named pipes for communicating with multiple clients and to perform overlapped operations . What is the equivalent to this in linux. I have checked linux named pipes(FIFO), but they seem to support only one client and server an...

.NET NamedPipes client server communication issues web service

I'm trying to make a client/server talk back and forth in a project i'm working on. It seems to work OK when talking between 2 windows services (so far). But it seems to run into some problems when i put the client side in a web service. It works fine at first until lots of requests hit it in quick succession at which point the web se...