ipc

how to learn Java RMI quickly

帅比萌擦擦* 提交于 2019-12-12 07:58:58
问题 I have a Java application I've been working on for a year or two now. I would like to create a very simple set (with potential to add complexity later) of interfaces that I can use to control my Java app from another JVM (e.g. MATLAB). I am assuming RMI is the best way to do this, but I'm not sure, as I know next to nothing about it. What is the best way to learn RMI quickly? Let's say I want to use an interface like this: interface Application { public void setLoggingEnabled(boolean enable);

Creating Callbacks for required modules in node.js

只愿长相守 提交于 2019-12-12 07:24:16
问题 Is there any possibilitie for creating some kind of a callback within a module created by my own? My problem is that I have written a module for my application. Within this module is done some task and now my main-app should get a feedback that the module finished his task. The following describes what i want but wont work ofcourse... //module mymod.js function start() { var done = false; //do some tasks done = true; } exports.done = done; Main App var mymod = require("./mymod.js"); while(

share queue between parent and child process in c++

落爺英雄遲暮 提交于 2019-12-12 04:39:11
问题 I know there are many way to handle inter-communication between two processes, but I'm still a bit confused how to deal with it. Is it possible to share queue (from standard library) between two processes in efficient way? Thanks 回答1: Simple answer: Sharing an std::queue by two processes can be done but it is not trivial to do. You can use shared memory to hold the queue together with some synchronization mechanism (usually a mutex). Note that not only the std::queue object must be

Sending signal from parent to child and vice-versa

那年仲夏 提交于 2019-12-12 04:18:34
问题 I am trying to practice signals and was trying to achieve below things 1) Child and parent prints 10 numbers and passes the baton to other 2) Parent/Child wait for there turn through sigsuspend 3) sigaction is just for heck of it to catch the signal 4) kill is used send the signal with respective process id However the output is marred with race-conditions and I see once parent gets signal from child control is never handed back to child Also I expected sigaction to catch the signal as well

Shard Memory Ipc triggers the EventHandler on Console, fails on Wpf Application

∥☆過路亽.° 提交于 2019-12-12 04:02:59
问题 I am practicing on implementing a MMF as IPC, I have tried it via wpf as listener and set it's event handler which does trigger. Now that I have moved the same setter code into a Wpf (the setter till that point was Console App) on the Wpf App I could not get the event handler to fire. this is the code I have successfully implemented and I am not sure if this implementation is right, ...the only thing I ma sure of is that it sends data, receives a reply(from wpf actually) and fires its event(

How to read time from a file without converting

别说谁变了你拦得住时间么 提交于 2019-12-12 03:00:11
问题 My question is general, but I will explain it using a specific example. Suppose I need to communicate time between two applications. A simple way is to have one application write the output of gettimeofday() ( tv_sec and tv_usec ) to a file and let the other app read it. The second app needs to 'convert' the strings in order to get an instance of timeval . Is there any way to avoid the conversion? Is there a better way to do this than simple file write/read? 回答1: Assuming both processes are

Perl - How to use a process Handle created in a Module in another Perl Script

狂风中的少年 提交于 2019-12-12 02:44:18
问题 Ultimately, what I want to do is to start a process in a module and parse the output in real time in another script. What I want to do : Open a process Handler (IPC) Use this attribute outside of the Module How I'm trying to do it and fail : Open the process handler Save the handler in a module's attribute Use the attribute outside the module. Code example : #module.pm $self->{PROCESS_HANDLER}; sub doSomething{ ... open( $self->{PROCESS_HANDLER}, "run a .jar 2>&1 |" ); ... } #perlScript.pl my

c# app communicate with vb6 app

白昼怎懂夜的黑 提交于 2019-12-12 02:13:27
问题 I wrote a c#.net 4.0 application and I need to send data to a VB6 application. the VB6 can send and recive data via DDE, but I can't find any working and or understandable DDE protocol for my C# app. I can try and change the communication protocol of the VB app. Do you have any suggestions for suitable protocol? I found this topic and I think I will choose the TCP winsock protocol, which is availible at the two workspaces, but I can't find any working code sample of such multilanguege use of

Start and manage external process from a WPF app

坚强是说给别人听的谎言 提交于 2019-12-12 02:09:46
问题 I have a WPF application and I need to spin up a separate MFC application and then communicate with it. I was going to use Process.Start , but I'm wondering if there is a better way to do this these days. I can research things myself, but I need to know where to start. Thanks. Edits: I found this suggesting there isn't. Is this true? Alternatives to System.Diagnostics.Process.Start() Thanks. 回答1: For your immediate question, there is nothing new in the recent versions of .NET that gives a

How to send strings to a WinForms application from another application using methods

眉间皱痕 提交于 2019-12-12 02:07:24
问题 I have an EXE that I've created called logger which is a simple WinForms application. It has a richtextbox and that's pretty much it. I then also have a suite of other applications. What I want to be able to do with these apps is to be able to get them to write output to the logger.exe I have full control over the code of all applications. I understand I could do a process.start and specify arguments but I want these apps to be able to write to the richtextbox at will based on the methods