I am looking at a linux server program that for each client creates some shared memory and uses message queues (C ++ class called from code) in this shared memory to send messages back and forth. At first glance, this looks like the same usage pattern as domain sockets — that is, there is a server program that sends and returns a payload from its clients.
My question is: what additional work does unix domain sockets do? What can lead to the fact that the shared memory with the message queue will be faster than the socket, and vice versa?
I assume there is some overhead for calling send and recv, but I'm not quite sure what. I could try and compare this, just looking for some ideas before I do this.
source share