Chapter 57 Unix Domain Sockets
Objectives
We would like to :
- Look at unix domain sockets.
Notes
- Addresses in AF_UNIX are file paths.
- For AF_UNIX the path is around 100 bytes.
- Permissions on this path apply.
- While they look like files, they are not.
- You can not open/close a socket path.
- The path name can not exist at bind.
-
unlink(const char * pathname)
command
- Could check for ENOENT - file does not exist.
- memset assures that all fields are cleared.
- message sizes should be limited to 2048 bytes for portability
- There is a system call (socketpair) that functions like pipe