Communicate between running programs in Linux

svdsinner

Ars Legatus Legionis
15,152
Subscriptor
I'm working on a raspberry pi project that is the brain for a robot. I've got one program that controls the actions of the robot and am making a web front-end as a remote-control/development interface.

My experience with Linux is limited, but I am assuming there are some ways to do this.

What is a good way in Linux to have one process talk to another running process? If it matters, I'm writing both apps in .NET Core 5.0.
 
D

Deleted member 43669

Guest
If you don't need a ton of performance, you can still use TCP/IP (over loopback). And if at some point you want to run some bit remotely, maybe it already works well. edit: I would expect TCP/IP to be better supported on .NET. Plus you could go HTTP or whatever...

There are probably some good libraries to do communication that can switch transports, so it's easy to change from named pipes to TCP/IP if required, but I'm not very well versed in that space.
 

hanser

Ars Legatus Legionis
43,853
Subscriptor++
I've got to say that you guys are great. When I asked the question I was in complete tunnel vision thinking that being in Linux requires special linux-only methods and completely forgot that I can still use .NET functions like TCP listeners.

Thanks for slapping me out of my tunnel vision.
Yes and no. Named pipes on Linux and macOS don't support message-based pipes the way Windows does. They're fundamentally different than pipes in Windows.