For people like me who were aware that this magic exists, but not how it is done: You might want to look at:
http://www.normalesup.org/~george/comp/libancillary/ [code]
http://www.lst.de/~okir/blackhats/node121.html [description]
Can you give a link to good example code and documentation about this?
Re:Unix: When pipes get names
by denysonique on Wednesday October 09, 2013 @05:16AM
(#6520195)
http://nodejs.org/api/net.html#net_net provides one example, instead of binding to a host/port it listens on a UNIX socket.
In addition to doing cool things like passing open files over a UNIX socket, or credentials (your remote server can verify the UID of whoever opened the file in the other end!) the SOCK_DGRAM UNIX sockets are reliable and accept packets beyond normal UDP limits. This is useful for load balancing (you don't have to proxy your connection but can pass the new accepted socket directly to whowever is going to send data to it).
So if you want to make a simple server yet requesting/replying good size packets you can bind it to AF_LOCAL/SOCK_DGRAM, then the client calls bind() and sendto() while the server calls bind, then recvfrom() (which fills in the address of the caller) and sendto() back.