named-pipes

What is a good way to shutdown Threads blocked on NamedPipeServer#WaitForConnection?

拟墨画扇 提交于 2019-11-26 13:57:02
问题 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 NamedPipeServerStream(m_sPipeName, PipeDirection.InOut, m_iMaxInstancesToCreate, PipeTransmissionMode.Message, PipeOptions.None)) { m_pipeServers.Add(pipeStream); while (!m_bShutdownRequested

Multiple pipes in subprocess

核能气质少年 提交于 2019-11-26 11:24:23
I am trying to use Sailfish, which takes multiple fastq files as arguments, in a ruffus pipeline. I execute Sailfish using the subprocess module in python, but <() in the subprocess call does not work even when I set shell=True . This is the command I want to execute using python: sailfish quant [options] -1 <(cat sample1a.fastq sample1b.fastq) -2 <(cat sample2a.fastq sample2b.fastq) -o [output_file] or (preferably): sailfish quant [options] -1 <(gunzip sample1a.fastq.gz sample1b.fastq.gz) -2 <(gunzip sample2a.fastq.gz sample2b.fastq.gz) -o [output_file] A generalization: someprogram <

Multithreaded NamePipeServer in C#

和自甴很熟 提交于 2019-11-26 11:23:22
问题 Hi I want to use NamedPipeServerStream which is new from .NET 3.5 for namedpipe communication. I want to write multi-threaded pipe server. is it handled by default or I should write code for that. my pipe server should handle multiple request at a time any solution or code ? 回答1: Each NamedPipeServerStream instance is a Stream implementation wrapping a handle to an instance of a named pipe. You can (and a multithreaded pipe server will) have multiple instances of NamedPipeServerStream for the

IPC performance: Named Pipe vs Socket

一笑奈何 提交于 2019-11-26 10:08:01
问题 Everyone seems to say named pipes are faster than sockets IPC. How much faster are they? 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 by considerable amount. 回答1: I would suggest you take the easy path first, carefully isolating the IPC mechanism so that you can change from socket to pipe, but I would definitely go with socket first. You should be sure IPC performance is a problem before

What are named pipes?

亡梦爱人 提交于 2019-11-26 08:45:53
问题 What are they and how do they work? Context happens to be SQL Server 回答1: Both on Windows and POSIX systems, named-pipes provide a way for inter-process communication to occur among processes running on the same machine. What named pipes give you is a way to send your data without having the performance penalty of involving the network stack. Just like you have a server listening to a IP address/port for incoming requests, a server can also set up a named pipe which can listen for requests.

Shared memory between 2 processes (applications)

会有一股神秘感。 提交于 2019-11-26 08:25:50
问题 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 can read. Is this possible in .NET? How? Thanks 回答1: Right now, .NET doesn't support sections (aka Memory Mapped Files). It will soon, the 4.0 version has the System.IO.MemoryMappedFiles namespace. There is a good reason it took so long and also the

WCF named pipe minimal example

余生颓废 提交于 2019-11-26 03:53:06
I'm looking for minimal example of WCF Named Pipes (I expect two minimal applications, server and client, which can communicate via a named pipe.) Microsoft has the briliant article Getting Started Tutorial that describes WCF via HTTP, and I'm looking for something similar about WCF and named pipes. I've found several posts in the Internet, but they are a little bit "advanced". I need something minimal, only mandatory functionality, so I can add my code and get the application working. How do I replace that to use a named pipe? <endpoint address="http://localhost:8000/ServiceModelSamples

Multiple pipes in subprocess

元气小坏坏 提交于 2019-11-26 02:24:52
问题 I am trying to use Sailfish, which takes multiple fastq files as arguments, in a ruffus pipeline. I execute Sailfish using the subprocess module in python, but <() in the subprocess call does not work even when I set shell=True . This is the command I want to execute using python: sailfish quant [options] -1 <(cat sample1a.fastq sample1b.fastq) -2 <(cat sample2a.fastq sample2b.fastq) -o [output_file] or (preferably): sailfish quant [options] -1 <(gunzip sample1a.fastq.gz sample1b.fastq.gz) -2

WCF named pipe minimal example

跟風遠走 提交于 2019-11-26 01:14:38
问题 I\'m looking for minimal example of WCF Named Pipes (I expect two minimal applications, server and client, which can communicate via a named pipe.) Microsoft has the briliant article Getting Started Tutorial that describes WCF via HTTP, and I\'m looking for something similar about WCF and named pipes. I\'ve found several posts in the Internet, but they are a little bit \"advanced\". I need something minimal, only mandatory functionality, so I can add my code and get the application working.

Example of Named Pipes

旧城冷巷雨未停 提交于 2019-11-25 20:44:02
How do I write a simple--bare minimum needed for it to work--test application that illustrates how to use IPC/Named Pipes? For example, how would one write a console application where Program 1 says "Hello World" to Program 2 and Program 2 receives message and replies "Roger That" to Program 1. using System; using System.IO; using System.IO.Pipes; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { StartServer(); Task.Delay(1000).Wait(); //Client var client = new NamedPipeClientStream(