00001 #include "headers.h" 00002 00003 #ifdef WIN32 00004 00005 int initSockets() { 00006 WSADATA wsaData; 00007 //WORD wVersionRequested; 00008 00009 //wVersionRequested = MAKEWORD(REQUESTED_SOCKET_VERSION); 00010 00011 if(WSAStartup( 0x0202, &wsaData ) != 0) { // Confirm Winsock Supports 2.2 00012 //if (WSAStartup(wVersionRequested, &wsaData) != 0) { 00013 cout << "WSAStartup Error: " << WSAGetLastError() << "\n"; 00014 return false; 00015 } 00016 00017 return true; 00018 } 00019 00020 #else 00021 00022 #ifndef initSockets 00023 int initSockets() { return true; } 00024 #endif 00025 #endif