Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the simplest method of inter-process communication between 2 C# processes?

Tags:

c#

ipc

I want to create a communication between a parent and a child process, both written in C#.

It should be asynchronous, event-driven.

I don't want to run a thread in every process to handle the very rare communication.

What is the best solution for it?

like image 389
Horcrux7 Avatar asked Feb 09 '09 15:02

Horcrux7


People also ask

What is Inter Process communication communication between two process?

Interprocess communication is the mechanism provided by the operating system that allows processes to communicate with each other. This communication could involve a process letting another process know that some event has occurred or the transferring of data from one process to another.

Which method is used for inter process communication?

Different ways of IPC are pipe, message passing, message queue, shared memory, direct communication, indirect communication and FIFO. It is important to obtain synchronization among processes in IPC to maintain data consistency. Semaphore and mutex are two ways to do so.

Which one is fastest form of Inter Process communication?

Shared memory is the fastest form of interprocess communication. The main advantage of shared memory is that the copying of message data is eliminated.

What is used for communication between two processes on different systems?

Inter process communication (IPC) is used for exchanging data between multiple threads in one or more processes or programs. The Processes may be running on single or multiple computers connected by a network. The full form of IPC is Inter-process communication.


1 Answers

Anonymous pipes.

Use Asynchronous operations with BeginRead/BeginWrite and AsyncCallback.

like image 143
Carlos A. Ibarra Avatar answered Oct 14 '22 21:10

Carlos A. Ibarra