in reply to What is Domain?

You should be using either PF_INET or AF_INET. Here's a short note about the difference, which seems to be relatively negligible, in practice. Use PF_INET, since that's what used in perlman:perlipc, I guess. In general, though, they have the same value, so it doesn't really matter.

And you're using INET instead of UNIX (like AF_UNIX) because you want internet-domain sockets (INET), not Unix-domain sockets (UNIX).

Take a look at perlman:perlipc for more details, particularly the "UDP: Message Passing" section.