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?
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.
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.
Shared memory is the fastest form of interprocess communication. The main advantage of shared memory is that the copying of message data is eliminated.
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.
Anonymous pipes.
Use Asynchronous operations with BeginRead/BeginWrite and AsyncCallback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With