rllib  1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
rlsocket.cpp File Reference
#include "rldefine.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.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"
Include dependency graph for rlsocket.cpp:

Go to the source code of this file.

Macros

#define WTREAD_GNUC5   ( __GNUC__ * 1000 ) + __GNUC_MINOR__
 
#define MSG_NOSIGNAL   0
 
#define MSG_NOSIGNAL   0
 

Functions

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 ()
 

Macro Definition Documentation

#define MSG_NOSIGNAL   0

Definition at line 53 of file rlsocket.cpp.

#define MSG_NOSIGNAL   0

Definition at line 53 of file rlsocket.cpp.

#define WTREAD_GNUC5   ( __GNUC__ * 1000 ) + __GNUC_MINOR__

Definition at line 30 of file rlsocket.cpp.

Function Documentation

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 ( )

Definition at line 68 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;
}