I am looking at a linux server program which, for each client, creates some shared memory and uses message queues (a C++ class called from the code) in that shared memory to send messages to and fro. On the face of it this sounds like the same usage pattern as domain sockets - i.e. have a server program that sends and recvs payloads from its clients.
My question is - what extra work do unix domain sockets do? What could conceivably cause shared memory with a message queue to be faster than a socket and vice versa?
My guess is there is some overhead to calling send and recv, but I'm not exactly sure what. I might try and benchmark this, just looking for some insight before I do this.