Updated DHT_test with WSA stuff.

This commit is contained in:
irungentoo 2013-06-24 17:41:19 -04:00
parent af1b3b7f9b
commit b792e3d6ad

View File

@ -26,6 +26,14 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
#ifdef WIN32
WSADATA wsaData;
if(WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
return -1;
}
#endif
if (argc < 3) { if (argc < 3) {
printf("usage %s ip port\n", argv[0]); printf("usage %s ip port\n", argv[0]);
exit(0); exit(0);
@ -82,5 +90,9 @@ int main(int argc, char *argv[])
} }
c_sleep(100); c_sleep(100);
} }
#ifdef WIN32
WSACleanup();
#endif
return 0; return 0;
} }