named-pipes

libevent EVLOOP_NO_EXIT_ON_EMPTY not working?

你离开我真会死。 提交于 2019-12-11 12:04:49
问题 I don't understand how the EVLOOP_NO_EXIT_ON_EMPTY flag is supposed to work in version 2.1.x of libevent. If I don't add any events to my event_base the event_base_loop(my_base, EVLOOP_NO_EXIT_ON_EMPTY); call returns immediately which is not at all what I think it's supposed to do. If I add an event it loops with that pending event until it get's active but then the loop exits which I hoped would not happen. Goal: Have a named pipe open and libevent listening for a read. Whenever I echo

Why does reading from pipe block the process?

∥☆過路亽.° 提交于 2019-12-11 10:09:53
问题 I have two processes ( both .NET Framework applications) and i am trying to communicate using Named Pipes The client connects to the pipe , but when it tries to ReadAsync the message sent by the server, it starts waiting indifinetly , even though the server has already sent a message !! What surprises me is that if i close the Server app the Client finally continues to the next line of code (after the ReadAsync line), having read 0 bytes. Is there anything i must to on the server after

WCF named pipes unknown error

佐手、 提交于 2019-12-11 08:46:58
问题 I have two different processes (on the same session, both not elevated) that communicate using Named Pipes on a self-hosted service (hosted in the server process). On rare conditions (2-3% of the users), the client will not be able to connect o the server. It happens only under UAC and with no elevation. To be perfectly clear, in most cases the app works perfectly fine for users with UAC and not-elevated sessions. I found out that running everything as an Administrator resolves this issue,

Named pipe in windows, difference between FILE_FLAG_OVERLAPPED and PIPE_NOWAIT

余生颓废 提交于 2019-12-11 08:28:12
问题 I am using named pipe in windows and confused about the difference between FILE_FLAG_OVERLAPPED and PIPE_NOWAIT which are parameters set in CreateNamedPipe ,I set parameters like this. HANDLE hPipe = CreateNamedPipe( lpszPipename, // pipe name PIPE_ACCESS_DUPLEX | // read/write access FILE_FLAG_OVERLAPPED, // overlapped mode PIPE_TYPE_MESSAGE | // message-type pipe PIPE_READMODE_MESSAGE | // message read mode PIPE_WAIT, // blocking mode PIPE_UNLIMITED_INSTANCES, // unlimited instances BUFSIZE

generating proxy class for WCF service using named pipes binding

旧城冷巷雨未停 提交于 2019-12-11 07:49:24
问题 I am trying to generate a proxy class which uses named pipes binding, and is hosted locally via a Windows Service. I am confused on how to do this since I don't have a URL to point the svcutil command to. Below is the method I used for opening the host via the Windows Service. host = new ServiceHost(typeof(MyCoolService.MyCoolService), new Uri[] { new Uri("net.pipe://localhost") }); _host.AddServiceEndpoint(typeof(IMyCoolServiceObj), new NetNamedPipeBinding(), "MyCoolServicePipe"); Currently

WCF FaultContract Fails with NamedPipe

倾然丶 夕夏残阳落幕 提交于 2019-12-11 06:44:54
问题 I have a simple IPC mechanism that uses WCF and named pipes. My goal is to propagate exception details (including the stacktrace) to the client for logging purposes (the rest of the application logging is located on the client). If I use the following code I am able to catch FaultException<Exception> on the client and see exception details: Contract: [ServiceContract] public interface IService { [OperationContract] [FaultContract(typeof(Exception))] void DoSomething(); } Implementation:

GNU Parallel as job queue with named pipes

淺唱寂寞╮ 提交于 2019-12-11 06:16:56
问题 I followed the sample code to create a gnu parallel job queue as below // create a job queue file touch jobqueue //start the job queue tail -f jobqueue | parallel -u php worker.php // in another shell, add the data while read LINE; do echo $LINE >> jobqueue; done < input_data_file.txt This approach does work and handles the job as a simple job queue. But there are two problems 1- reading data from input file and then writing it to the jobqueue (another file) is slow as it involves disk I/O. 2

COM port communication with Virtual PC (part 2)

假装没事ソ 提交于 2019-12-11 05:25:11
问题 This question is related to my earlier question. Connecting to the pipe is now successful, but I still cannot read (or write) any data from the port. My first guess was, that the data are buffered. But even when I write (on the client site) 5000 bytes (the buffer in NamedPipeClientStream is 512 byte large), I do not receive any data. PipeOptions.WriteThrough didn't changed anything, too. When I do not use a pipe, but a textfile (in the Virtual-PC settings) to redirect the data written to the

Not getting any Response from Named Pipe Server

我只是一个虾纸丫 提交于 2019-12-11 04:57:24
问题 I have created a NamedPipe inside a Windows Service and starting the Service Manually or as the System Starts up. EDIT: lpszPipename = TEXT("\\\\.\\pipe\\1stPipe"); OVERLAPPED m_OverLaped; HANDLE hEvent; hPipe=CreateNamedPipe (lpszPipename, PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_NOWAIT, PIPE_UNLIMITED_INSTANCES,BUFSIZE, BUFSIZE,0,NULL); m_OverLaped.hEvent=CreateEvent(NULL,TRUE,TRUE,NULL); m_OverLaped.Internal=0; m_OverLaped.InternalHigh=0;

named pipe callback takes 10 seconds?

随声附和 提交于 2019-12-11 03:33:09
问题 got wcf dll with client and server classes wraping it. when my server uses callback it takes over 10 seconds for my client to get it.. what is going on? only got simplest NetNamedPipeBinding endpoint. got lots of code so I'm not sure what to paste here. what can cause such a long time. EDIT: only first callback takes 10 seconds.. after this it works fast. any one knows why? 回答1: I had similar problem. This helped in my case: NetNamedPipeSecurity security = new NetNamedPipeSecurity() { Mode =