![]() |
|
AF_INET or PF_INET? |
Myrdos
Member #1,772
December 2001
|
Which one is considered to be better style? I had a look in the man page for socket, and it showed PF_INET. However, it later refers to AF_INET further down the page. A shocking lack of consistency... I searched the web with no good results, some people use one, some people use the other. One thing I noticed: most people who use PF_INET place it in the socket() parameter, but use AF_INET elsewhere in their program. Any reason for this, or does it even matter? __________________________________________________ |
CGamesPlay
Member #2,559
July 2002
![]() |
AF_INET = Address Format, Internet = IP Addresses [edit] According to the link, it's: AF_INET = Address Family, Internet = IP Addresses You should read the comments -- Ryan Patterson - <http://cgamesplay.com/> |
Myrdos
Member #1,772
December 2001
|
O .... K. I think I get it now. We want to use protocol families for sockets, and address families for addresses. Makes sense. It's just a happy coincidence that they're both equal to two, and are therefore interchangeable. A coincidence that I should not rely on. I did read the comments, but somehow their meaning escaped me...:-[ __________________________________________________ |
|