named-pipes

No endpoint listening at net.pipe

这一生的挚爱 提交于 2019-12-10 14:55:26
问题 I am getting the following error: There was no endpoint listening at net.pipe://localhost/ServiceModelSamples/service that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. I am calling WCF self hosted service inside windows service from another WCF call as follows. _host = new ServiceHost(typeof(CalculatorService), new Uri[] { new Uri("net.pipe://localhost/PINSenderService") }); _host.AddServiceEndpoint

All instances busy exception on named pipe creation

好久不见. 提交于 2019-12-10 12:38:15
问题 I have a windows service which is communicating with a gui application via named pipes. Therefor i have a thread running waiting for the app to connect which is running fine if i do it once. But if the thread is creating a new instance of the named pipe stream server the already established connection breaks down and i get the all instances busy exception. The code fragment where the exception is thrown is this: class PipeStreamWriter : TextWriter { static NamedPipeServerStream _output = null

Russell Libby's Pipes components

痞子三分冷 提交于 2019-12-10 11:10:51
问题 Does anyone know where I could download Russell Libby's named pipes components? All the links I can find point to http://home.roadrunner.com/~rllibby/source.html Which is no longer alive. HMcG 回答1: I have found the TPipeServer and TPipeClient source code here. Looks like the original Russell Libby's code. 回答2: Here's the version I have on my system. I tried posting it directly in this comment but it is too long. This source code should work on Delphi 6 and up (including Delphi 2009, 2010, and

C - named pipe for multiple forked children

隐身守侯 提交于 2019-12-10 09:54:00
问题 If you have multiple children created by fork(), and the method of communication with the parent is "named pipes", do you need multiple named pipes? One for each child? Or can you make one and have the parent read from that? Basically, is there anything else you need to do? I understand if several children write to the same named pipe at the same time, it might cause a problem with reading a whole message from a single child. Is there a way to make sure the writes are atomic? 回答1: You can

Named pipes vs. UDP for IPC on Windows

橙三吉。 提交于 2019-12-10 07:51:08
问题 Why Named Pipes are preferable for IPC (Inter Process Comunication) on local Windows machine over UDP? Or UDP sometimes might be somewhere better? 回答1: UDP packets even on localhost can be lost. Also, as UDP is datagram-based and has no guaranteed delivery, it's hard to transfer larger data blocks. Finally, UDP on localhost is sometimes blocked by browsers. In general, UDP is usually not even considered for single-computer IPC. On Windows I recommend memory-mapped files + synchronization

Named pipes server read timeout

拜拜、爱过 提交于 2019-12-10 04:01:31
问题 When using C# NamedPipeServerStream, in case a client doesn't send any message-end-pattern (like \r\n when server reads with ReadLine()) NamedPipeServerStream Read methods will wait forever and no Abort() or Interupt() methods will work on that thread. Since: 1) Stream.ReadTimeout not supported for NamedPipeServerStream 2) Abort() or Interupt() doesn't work on thread 3) NamedPipeServerStream.Disconnect() nether work It is unclear, how to setup timeout on NamedPipeServerStream read operations?

Can I open a named pipe on Linux for non-blocked writing in Python?

送分小仙女□ 提交于 2019-12-10 03:32:32
问题 I created a fifo file using mkfifo . Is it possible to open/write to this without blocking? I'd like to be agnostic whether there is a reader or not. The following: with open('fifo', 'wb', 0) as file: file.write(b'howdy') Just stalls at the open until I do a cat fifo from another shell. I want my program to make progress regardless there's a data consumer watching or not. Is there a different linux mechanism I should be using perhaps? 回答1: From man 7 fifo : A process can open a FIFO in

Detect when reader closes named pipe (FIFO)

限于喜欢 提交于 2019-12-10 03:24:20
问题 Is there any way for a writer to know that a reader has closed its end of a named pipe (or exited), without writing to it? I need to know this because the initial data I write to the pipe is different; the reader is expecting an initial header before the rest of the data comes. Currently, I detect this when my write() fails with EPIPE . I then set a flag that says "next time, send the header". However, it is possible for the reader to close and re-open the pipe before I've written anything.

Python and Windows Named Pipes

守給你的承諾、 提交于 2019-12-08 23:29:31
问题 What is the proper way of communicating with named pipes on Windows from Python? I've googled it, and can't find any packages that wrap this communication. There are: some descriptions of how to do it with pywin32 (I could not find how to connect to an existing pipe with it, though). This package: https://pypi.python.org/pypi/PyWPipe/ (had no luck with it either) A piece of code here, that I haven't yet tested: http://jonathonreinhart.blogspot.ru/2012/12/named-pipes-between-c-and-python.html

NamedPipeServerStream/async reliable disconnect issues

China☆狼群 提交于 2019-12-08 11:37:27
问题 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, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous, 4096, 4096, pipeSa); m_OutputQueue = new List<My_Message>(); In the timer tick routine is the main service loop, which looks like this: do { if (!m_bClientAttached) { try { m_pipeServer