rllib  1
Defines | Functions
rlsocket.cpp File Reference
#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"
Include dependency graph for rlsocket.cpp:

Go to the source code of this file.

Defines

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

Define Documentation

#define MSG_NOSIGNAL   0

Definition at line 52 of file rlsocket.cpp.

#define MSG_NOSIGNAL   0

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