Re: [Dev-C++] Socket Programming - Newbie - sockaddr 16 bytes?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel K. O. <dan...@ya...> - 2004-11-07 13:23:20
|
Obi wrote:
> You're right, my mistake. AF_ defines are for the sockaddr structures
> & PF_ for the socket call. However most
> of the literature uses AF_ for the socket call too. ( Some docs I have
> specifically say to use AF_ defines ).
Yes. The docs say different things, that's why I asked in the other
e-mail for the standard...
My offline Winsock 1 reference ("winsock.hlp") says:
---
SOCKET PASCAL FAR socket ( int af, int type, int protocol );
af An address format specification. The only format currently
supported is PF_INET, which is the ARPA Internet address format.
---
The MSDN's Winsock 2 reference for socket() doesn't say a word about the
constant that should be used.
Some articles there use AF_INET, but reference implementations mostly
use PF_INET (e.g.:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/ipv6_enabled_server_code_2.asp
).
Daniel K. O.
|