C & TCP question: AF_INET vs AF_UNIX

Greetings!

I am attempting to write a *basic* network client in C. I have manage to create a socket but I have doubts as far as using AF_INET vs AF_UNIX.

At the present time, my client runs with AF_INET. Is AF_UNIX faster across hosts using the same OS flavor (Red Hat)? What is the difference between the two families?:confused:

I have found a post from 6 years ago asking the same question ( http://www.unix.com/security/8426-af\_unix-versus-af_inet.html\#post29544 ) but it was never answered.

Any help is welcome. Thanks!

Al.

AF_INET uses the TCP/IP protocol. AF_UNIX creates filesystem objects and it only works between processes on the same host. AF_UNIX is much faster than AF_INET.