LPINT addrlen,
LPCONDITIONPROC lpfnCondition,
DWORD dwCallbackData
);
Parameter description:
S: A descriptor that identifies a windows socket, which listens for connections after listen ().
Addr: (optional) a pointer to store the buffer address of the physical address known by the communication layer. The specific format of the addr parameter is determined by the address family generated when the windows socket is created.
Addrlen: (Optional) Stores a pointer to an address with an integer length of addr address.
LpfnCondition: (optional) the address of the process instance of the condition function provided by the user. This function makes a decision of acceptance or rejection according to the caller information passed in by the parameter, and (optionally) creates and/or joins a windows socket group by assigning a specific value to the result parameter.
DwCallbackData: Callback data returned to the application as a conditional function parameter. WinSock does not parse this parameter.
Return value:
If no error occurs, the WSAAccept () function returns the descriptor of the accepted windows socket. Otherwise, an INVALID_SOCKET error will be returned, and the application can obtain the corresponding error code through WSAGetLastError ().
The integer referenced by the addrlen parameter initially contains the number of spaces pointed by the addr parameter, and the actual length of the return address is included when the call is returned.