#include "rldefine.h"
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "rlsocket.h"
#include "rlwthread.h"
#include "rlcutil.h"
Go to the source code of this file.
|
void WSAAPI | freeaddrinfo (struct addrinfo *) |
|
int WSAAPI | getaddrinfo (const char *, const char *, const struct addrinfo *, struct addrinfo **) |
|
int WSAAPI | getnameinfo (const struct sockaddr *, socklen_t, char *, DWORD, char *, DWORD, int) |
|
int | rlwsa () |
|
void WSAAPI freeaddrinfo |
( |
struct addrinfo * |
| ) |
|
int WSAAPI getaddrinfo |
( |
const char * |
, |
|
|
const char * |
, |
|
|
const struct addrinfo * |
, |
|
|
struct addrinfo ** |
|
|
) |
| |
int WSAAPI getnameinfo |
( |
const struct sockaddr * |
, |
|
|
socklen_t |
, |
|
|
char * |
, |
|
|
DWORD |
, |
|
|
char * |
, |
|
|
DWORD |
, |
|
|
int |
|
|
) |
| |
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;
}