-1

I want to create communication between multiple winform forms. I will have multiple forms from different projects. Every form can run and can be opened separately. But when they are opened they will look for each other and connect together.

I was thinking about simple TCP client/server but then I found signalR and socket.io. Now I'm not sure what to use. I will be sending json string.

Preferably I want to use local host communication.

Šimon Marko
  • 69
  • 1
  • 11

1 Answers1

1

The forms you're mentioning will be in different processes (launched via different application executables), right?

If so, then any of the multiple mechanisms of inter-process communication should work, but the exact choice would depend on your requirements. Some ideas:

  1. Anonymous / named pipes
  2. WCF
  3. Queuing mechanism where one process puts messages on a queue (e.g. in an SQLite database) and other consumes the messages (although it might not meet your "real-time" requirement)

Please consider googling for inter-process communication for more details. Also, this question and its answers give some overview of possible approaches: What is the simplest method of inter-process communication between 2 C# processes?

madbadger
  • 644
  • 2
  • 10
  • 15
  • Thank you. Yes they are in different processes. I also look at wcf but I read it's not the best solution. I will look at the pipes. – Šimon Marko Apr 24 '20 at 19:08