ipc

Sending arguments to an app-instance that resides in another process

孤街浪徒 提交于 2019-12-05 05:54:12
问题 I have a single-instance app (c#, WPF, .net3.51). The check if the app is already instantiated is done via a Mutex. If the app is already running, I open a new window from within the already opened app-instance. This works fine so far. However due to an app extension, I now must send the e.Args (or at least the first string of it) to the already running instance which resides in another process. How is this best done? Additional Information Currently I use a globaly registered Window-message

Named pipes server read timeout

时间秒杀一切 提交于 2019-12-05 04:12:40
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? Let me introduce an example. The specification of IPC we have require an exchange of \0-terminated

using EOF for signaling on unnamed pipes

白昼怎懂夜的黑 提交于 2019-12-05 04:10:56
I have a test program that uses unnamed pipes created with pipe() to communicate between parent and child processes created with fork() on a Linux system. Normally, when the sending process closes the write fd of the pipe, the receiving process returns from read() with a value of 0, indicating EOF. However, it seems that if I stuff the pipe with a fairly large amount of data (maybe 100K bytes0 before the receiver starts reading, the receiver blocks after reading all the data in the pipe - even though the sender has closed it. I have verified that the sending process has closed the pipe with

PHP Inter-process communication to monitor message queue

淺唱寂寞╮ 提交于 2019-12-05 03:44:54
问题 I'm working on a project where I'm generating stats for a leaderboard and several other locations. My goal with this is to have it as real-time as possible, so to that end I have implemented a RabbitMQ server for message queueing. On the frontend, I have a nodejs setup, to feed the information out to the clients who are watching it. On that same server, I have a PHP process to listen to the queue and log the messages to a database for history. What I'm trying to work out now is how to

Methods for calling APIs in one Nodejs app from another Nodejs app

…衆ロ難τιáo~ 提交于 2019-12-05 02:55:49
问题 Our application will have a website and a mobile app both communicating to the same API backend. I have one Nodejs application for serving only APIs and a second Nodejs app serving html pages for the website. I am using Expressjs web framework for both of these apps. What are different methods to call APIs in one Nodejs from another Nodejs app? Additional information on when to use each method would be great. EDIT: Example, I have the following applications NodejsAPI (node & express)

How do I make named pipes work between c++ and .NET?

ε祈祈猫儿з 提交于 2019-12-05 02:28:05
问题 I just had a really tough time making Named Pipes work between c++ and .NET. I had no problems creating Named Pipes that worked between 2 c++ apps, or between 2 .NET apps. 回答1: I dont have problem with this communication, i use this scenario in some project. C++ side: LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\pipename"); CHAR chReadBuf[1024]; DWORD cbRead; BOOL fResult; fResult = CallNamedPipe( lpszPipename, // pipe name _Message, // message to server strlen(_Message), // message length

Thrift IPC over pipes transport (Windows)

那年仲夏 提交于 2019-12-05 01:53:34
问题 I've been following Thrift support for Windows and VS development has come a long way thanks to a number of contributors. There are VS 2010 projects for the compiler and C++ library and I've confirmed that they work well in 0.8. http://thrift.apache.org/download/ My question is about implementing a transport layer in Thrift, specifically pipes (named or anonymous). I've been using TCP transport which works but in cases where the apps are all local, it's overkill and generally causes other

Best practices for passing data between processes in Cocoa

我只是一个虾纸丫 提交于 2019-12-05 01:23:25
问题 I am in the middle of solving a problem which requires me to do the following in my 64-bit Cocoa application: Spawn a 32-bit Cocoa helper tool (command line tool) from within my application. This helper will open a file (a quicktime movie to be precise) and access information about that file using 32-bit only APIs (Quicktime-C APIs) The data gathered from the 32-bit process needs to be passed back to the 64-bit application. The 64-bit app should wait until the 32-bit process completes before

IPC with a Python subprocess

二次信任 提交于 2019-12-05 01:04:27
问题 I'm trying to do some simple IPC in Python as follows: One Python process launches another with subprocess . The child process sends some data into a pipe and the parent process receives it. Here's my current implementation: # parent.py import pickle import os import subprocess import sys read_fd, write_fd = os.pipe() if hasattr(os, 'set_inheritable'): os.set_inheritable(write_fd, True) child = subprocess.Popen((sys.executable, 'child.py', str(write_fd)), close_fds=False) try: with os.fdopen

Shared memory vs. Go channel communication

拈花ヽ惹草 提交于 2019-12-04 23:58:52
One of Go's slogans is Do not communicate by sharing memory; instead, share memory by communicating . I am wondering whether Go allows two different Go-compiled binaries running on the same machine to communicate with one another (i.e. client-server), and how fast that would be in comparison to boost::interprocess in C++? All the examples I've seen so far only illustrate communication between same-program routines. A simple Go example (with separate client and sever code) would be much appreciated! One of the first things I thought of when I read this was Stackless Python. The channels in Go