WSASocket() function and Socket() function

Creates a socket bound to the specified transport provider, optionally creating and/or joining a socket group.
This function is an extended version of socket(), and its function is to create a raw socket. When using it, you need to include
the winsock2.h header file and link the ws2_32.lib library.

definition

SOCKET WSASocket (
  int af,
  int type,
  int protocol,
  LPWSAPROTOCOL_INFO lpProtocolInfo,
  GROUP g,
  DWORD dwFlags
  );

Parameter description:
af: [in] An address family specification. Only the AF_INET format is supported, which is the ARPA Internet address format.
type: Type description of the new socket.
protocol: The specific protocol used by the socket. If the caller does not want to specify the protocol, it is set to 0.
lpProtocolInfo: a

Guess you like

Origin blog.csdn.net/gogocsdn1/article/details/110187967
Recommended