What does the following code do? Please explain each line...
Why we need to put in Windows Socket Programs?
Why we do not use it in Linux or Unix?
Why at the end we do cleanup?
1 2 3 4 5 6 7 8 9 10 11
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(2, 2);
err = WSAStartup(wVersionRequested, &wsaData);
if (err != 0) {
printf("WSAStartup failed with error: %d\n", err);
return 1;
}