After looking at a unix named socket and i thought they were named pipes. I looked at name pipes and didnt see much of a difference. I saw they were initialized differently but thats the only thing i notice. Both use the C write/read function and work alike AFAIK.
Whats the difference between unix domain sockets and named pipes? When would i pick one over the other? Which should i use by default (like how i use use vector by default in C++ than use deque, list or whatever else if i have needs)?
UNIX-domain sockets are generally more flexible than named pipes. Some of their advantages are:
To use many of these features, you need to use the send()
/ recv()
family of system calls rather than write()
/ read()
.