2Way App Communication
BlitzMax Forums/BlitzMax Programming/2Way App Communication
| ||
Hi :) I'm going to create an application, which needs to have 2 executables running at the same time, and I need both of them to be able to write and recieve from the other one. I've used search and found PUB.FreeProcess, but all the examples are only a 1 way communication. Anyone care to explain how to do this? If it's even possible, but it should be :P Thanks |
| ||
Look for Mutex, Shared Memory and Messaging. |
| ||
You can use sockets to do it. You can also use shared memory through a dll. sockets is the most common though. |
| ||
You can also use shared memory through a dll. Or Budman's shared memory code without a DLL: |
| ||
Aight, Thanks a bunch mates, I'll go for the Sockets method tho, seems easiest. Thanks again :) |
| ||
Or Budman's shared memory code without a DLL: But then has a huge potential (as far as I can see) for concurrency issues.Use Sockets. |
| ||
If you're on Linux, use d-bus. Lots of choices :) |
| ||
Write usefull data into the shared memory and you don't have any problems. ie write the "target" as first byte in and only that app reads out the data that needs it. As the memory itself will handle concurrent accesses, you won't get any of the regular lockup issues. |
| ||
It's not a democratic decision to be made, but I also vote for sockets. |
| ||
As the memory itself will handle concurrent accesses, No it won't. |
| ||
Thanks for the replys! I'll go with the Sockets anyway, seems easiest and will give me an extra feature, to use the two applications on 2 different computers, creating more stability. By the way, Does anyone know how to execute an .exe file without the .exe file closing when I close the application that opened the file? Thanks again :) |