1.1 AfxSocketInit()
// 它在幕后替我做了什么?
Call this function in yourCWinApp::InitInstance override to initialize Windows Sockets.
BOOL AfxSocketInit(
WSADATA* lpwsaData = NULL
);
Parameters
A pointer to a WSADATA structure. If lpwsaData is not equal to NULL, then the addressof the WSADATA structure is filled by the call to WSAStartup.This function also ensures that WSACleanup is called for you before theapplication terminates.
Return Value