named-pipes

WCF Named Pipe Error: The pipe has been ended. (109, 0x6d)

牧云@^-^@ 提交于 2019-12-11 02:48:27
问题 I have looked at the other posts dealing with "The pipe has been ended. (109, 0x6d)" but none of them have solved my problem. I have a relatively simple setup bases off of this blog: http://tech.pro/tutorial/855/wcf-tutorial-basic-interprocess-communication I feel like I follow it pretty closely, only removing the HTTP binding. Here is the server code: public class InterProcessServer : IInterProcessServer { private ServiceHost _host = null; public event EventHandler<CommandLineArgsEventArgs>

Java MySQL - Named Pipe connection throws warning on close

怎甘沉沦 提交于 2019-12-11 02:47:53
问题 I am connecting to MySQL in Java with Connector/J using Named Pipes. My connection and query are successful, but I am receiving a warning when I try to close the connection. I would like to know what I should do to fix whatever is causing the warning other than removing connection.close() (or removing the try-with-resources connection block and not adding a connection.close()). Here is my code for the query: public static List<List> QueryDB(int RowValue) { List<Long> ValueList = new ArrayList

bidirectional named pipe question

做~自己de王妃 提交于 2019-12-11 01:56:07
问题 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 StreamReader.ReadToEnd() doesnt seem to return. What can I do to fix this? Listener code public Class Listener { private void ThreadFunc() { var pipe = new

How to make a WCF named pipe address equal to a WinApi one?

本秂侑毒 提交于 2019-12-10 20:44:15
问题 I noticed that WCF's named pipe address net.pipe://localhost/mynamedpipe and Windows API's \\.\pipe\mynamedpipe don't collide. Why is that? How can I make them point to the same pipe? 回答1: There is no documented way of doing that. After a few tests I came to the following conclusions: If you have a WCF server and a Win32 C++ client, the last one will see the first one address as a UUID in the following format: 12345678-1234-1234-1234-123456789abc And this UUID seems random, since it changes

Automate turning named-pipes and tcp\ip on

丶灬走出姿态 提交于 2019-12-10 20:27:01
问题 I am working on an install of a new product that requires modifications to SQL Server. Specifically, enable tcp/ip and turning on named pipes. I know how to do it manually. What i want is a way to automate this for a new customer though SQL or with C# code. I would love any suggestions for the right direction. 回答1: You can use C# and Server Management Objects (SMO) to do it. The classes you need are in the Microsoft.SqlServer.Smo and Microsoft.SqlServer.WmiManagement libraries. Here's a

Windows NAmed Pipes alternative in Linux

强颜欢笑 提交于 2019-12-10 19:45:05
问题 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 and do not support overlapped IO. Can you guide me regarding this. 回答1: Unix sockets. Essentially, Call socket(PF_UNIX, SOCK_STREAM, 0) . This returns a file

Named-pipe reading timeout

别说谁变了你拦得住时间么 提交于 2019-12-10 18:09:31
问题 I'm trying to set a timeout to the reading operation of my named pipe. In order to read from the named pipe, I'm using the ReadFile function. I read that a timeout can be set for this function with the SetCommTimeouts function but when I try to use it, I get system error 1: "Incorrect function". Here is my code (this is the client side): m_pipe = CreateFileA(pipeName, // pipe name GENERIC_READ | // read and write access GENERIC_WRITE, 0, // no sharing NULL, // default security attributes OPEN

Simulating streaming data

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 16:19:20
问题 I'm trying to write a program that will read from a flat file of data and simulate streaming it so I can test a program that reads streaming data without having to connect and start up the streaming hardware. What are the more realistic ways to accomplish this? I need it to stream at variable speeds depending on the hardware im simulating. My two ideas so far are a program that writes to a named pipe, or a program that writes to a virtual serial port at the rates I need. Is there a better

How can I get a list of all open named pipes in Windows and avoiding possible exceptions?

本秂侑毒 提交于 2019-12-10 16:12:17
问题 getting list of named pipes is in ideal case pretty simple and can be found here: How can I get a list of all open named pipes in Windows? But mentioned solution var namedPipes = Directory.GetFiles(@"\\.\pipe\"); has occasionally unpredictable results. One of them was mentioned in link above (Invalid character in path exception). Today I met my own exception - ArgumentException "Second path fragment must not be a drive or UNC name. Parameter name: path2". Question is whether there is any

Python: Check if named pipe has data

霸气de小男生 提交于 2019-12-10 15:34:31
问题 I have a Python3 process on my Unix system always running, and I want to be able to randomly send data to it through a named pipe from other processes that only run occasionally. If the named pipe doesn't have data, I want my process to continue doing other things, so I need to check whether it has data without blocking . I can't figure out how to check without opening it, but opening blocks unless I set the non-blocking flag. And if I set the flag, it crashes if I happen to write to the pipe