#include "rldefine.h"
#include <windows.h>
#include <winsock2.h>
#include <io.h>
#include <direct.h>
Go to the source code of this file.
you have to call this function before you use any sockets
(at least under windows)
Definition at line 42 of file rlsocket.h.
Definition at line 67 of file rlsocket.cpp.
{
#ifdef RLWIN32
static int first = 1;
WORD wVersionRequested;
WSADATA wsadata;
int err;
if(first == 1)
{
#ifdef IS_OLD_MSVCPP
wVersionRequested = MAKEWORD(1,1);
#else
wVersionRequested = MAKEWORD(2,0);
#endif
err = WSAStartup(wVersionRequested, &wsadata);
if(err != 0)
{
::printf("Startup error=%d on windows\n",err);
exit(0);
}
first = 0;
}
#endif
return 0;
}