Actually, I have software that runs in the ARM-Linux has three apps of mine.I want to run the one certain application in Linux host x86.

The internal components in my ARM-Linux program communicate using Unix domain socket.

My socket type is: AF_UNIX

I am using old ARM processor doesn't support Valgrind. There is some memory leak in the application that is causing the crash. So I build the application in the host and figuring out how to establish communication between ARM and x86 using domain socket?

Now I have a situation where the application foo is in ARM and bar is Linux x86. Question is it possible to communicate between the different host?

I thought Unix domain sockets are inter-domain after reading the below link, I got confused.

I read,

UNIX domain sockets are a method by which processes on the same host can communicate. Communication is bidirectional with stream sockets.

fd = socket(AF_UNIX, SOCK_STREAM, 0);
  • 1
    Sockets are, by their very nature, (by themselves) local to one host. – Kusalananda Feb 6 '18 at 14:47
  • As a work-around, you can use something as socat to divert UNIX sockets over TCP into other machines. – salva Apr 25 '18 at 11:59

No. You can't communicate across hosts on a network using AF_UNIX sockets, as those reference local inodes on the filesystem to bind the socket to, and the local filesystem is only available to the local host.

To communicate between nodes, you'll need to use an AF_INET socket, which will bind to an IP address and port, which could be reachable to a different host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.