
http://msdn2.microsoft.com/en-au/library/ms740506(VS.85).aspx

SOCKET WSAAPI socket(
  __in  int af,
  __in  int type,
  __in  int protocol
);

Parameters
af 
The address family specification. Possible values for the address family are defined in the Winsock2.h header file. 

On the Windows SDK released for Windows Vista and later, the organization of header files has changed and the possible values for the address family are defined in the Ws2def.h header file. Note that the Ws2def.h header file is automatically included in Winsock2.h, and should never be used directly.



http://msdn2.microsoft.com/en-au/library/ms740476(VS.85).aspx

int setsockopt(
  __in  SOCKET s,
  __in  int level,
  __in  int optname,
  __in  const char* optval,
  __in  int optlen
);
