Using UNIX Domain Datagram Sockets
Writing the Server and Client Processes
strcpy(servaddr.sun_path, SOCKET_PATH);
unlink(SOCKET_PATH);
bind(s, &servaddr, sizeof(struct sockaddr_un));
When to Bind Socket Addresses
The server process should bind socket addresses after socket is created
and before any other BSD Sockets system calls. Refer to the bind(2)
man page for more information on bind.
154
Chapter 7